math module
Behaviour matches CPython 3.14 for the implemented set, apart from the notes below.
Rounding: floor, ceil, trunc.
Roots / powers: sqrt, isqrt, cbrt, pow, exp, exp2, expm1.
Logarithms: log, log2, log10, log1p.
Trig: sin, cos, tan, asin, acos, atan, atan2.
Hyperbolic: sinh, cosh, tanh, asinh, acosh, atanh.
Angles: degrees, radians.
Float properties: fabs, isnan, isinf, isfinite, copysign,
isclose, nextafter, ulp.
Integer math: factorial, gcd, lcm, comb, perm.
Modular: fmod, remainder, modf, frexp, ldexp.
Special: gamma, lgamma, erf, erfc.
Constants: pi, e, tau, inf, nan.
fsum, prod, hypot, dist, sumprod, nan from arbitrary
payloads.
math.asin/math.acosreject inputs outside[-1, 1]withValueError: "expected a number in range from -1 up to 1, got <x>", where CPython says"math domain error".- Domain errors (e.g.
log(-1)) raiseValueError: "math domain error", matching CPython. - Overflow (finite input, infinite result) raises
OverflowError: "math range error", matching CPython. math.gammarejects non-positive integers (poles) withValueError.