std.math [core] std.math.int_max pub fn int_max() -> int — The greatest value of type int (2^63 - 1). std.math.int_min pub fn int_min() -> int — The least value of type int (-2^63). std.math.abs pub fn abs(n: int) -> int — Absolute value. std.math.signum pub fn signum(n: int) -> int — The sign of n: -1, 0 or 1. std.math.pow pub fn pow(b: int, e: int) -> int — b raised to the eth power by binary exponentiation. std.math.isqrt pub fn isqrt(n: int) -> int — The integer square root: the greatest r with r * r <= n. std.math.gcd pub fn gcd(a: int, b: int) -> int — The greatest common divisor of |a| and |b|, by Euclid. std.math.lcm pub fn lcm(a: int, b: int) -> int — The least common multiple of |a| and |b|; 0 when either is 0. std.math.div_floor pub fn div_floor(a: int, b: int) -> int — Division rounding toward negative infinity — the mathematician's quotient, unlike /, which truncates toward zero. std.math.div_ceil pub fn div_ceil(a: int, b: int) -> int — Division rounding toward positive infinity. std.math.rem_euclid pub fn rem_euclid(a: int, b: int) -> int — The Euclidean remainder: always in [0, |b|), unlike %, whose sign follows the dividend. std.math.checked_add pub fn checked_add(a: int, b: int) -> int ! {overflow} — a + b, or the overflow mark when the sum leaves int. std.math.checked_sub pub fn checked_sub(a: int, b: int) -> int ! {overflow} — a - b, or the overflow mark when the difference leaves int. std.math.checked_mul pub fn checked_mul(a: int, b: int) -> int ! {overflow} — a * b, or the overflow mark when the product leaves int. std.math.checked_div pub fn checked_div(a: int, b: int) -> int ! {div_zero} — a / b truncating toward zero, or the div_zero mark when b is 0. std.math.saturating_add pub fn saturating_add(a: int, b: int) -> int — a + b, clamped to [int_min(), int_max()] instead of trapping. std.math.saturating_sub pub fn saturating_sub(a: int, b: int) -> int — a - b, clamped to [int_min(), int_max()] instead of trapping. std.math.midpoint pub fn midpoint(a: int, b: int) -> int — The midpoint of a and b, rounded toward negative infinity, with no intermediate that can leave int — (a + b) / 2 overflows for large same-sign pairs and this does not.