math and math/bitsimport "math"
x := math.Sqrt(2)
y := math.Pow(2, 10)
z := math.Max(1, 2)
f := math.Mod(7, 3)
math.Pi, math.MaxFloat64, math.SmallestNonzeroFloat64, etc.
Prefer max and min builtins, or cmp.Compare.
math/bitsLeading zeros, rotations, population count — hot paths for bitsets and hashing.
import "math/bits"
n := bits.Len64(42)
Compare with tolerance for accumulated error when modeling real numbers.