Standard mathematical functions and constants, backed by the Rust runtime.
Archimedes' constant (π ≈ 3.141592653589793).
Euler's number (e ≈ 2.718281828459045).
Tau constant (τ ≈ 6.283185307179586).
Positive infinity (≈ 1e308).
Sine of x (radians).
Cosine of x (radians).
Tangent of x (radians).
Arc sine of x (result in radians).
Arc cosine of x (result in radians).
Arc tangent of x (result in radians).
Arc tangent of y/x (result in radians).
Hyperbolic sine of x.
Hyperbolic cosine of x.
Hyperbolic tangent of x.
Square root of x.
Cube root of x.
base raised to the power of exp.
Fused multiply-add: a * b + c (single rounding).
Euclidean norm: sqrt(a² + b²).
Floating-point remainder of a / b.
Largest integer ≤ x.
Smallest integer ≥ x.
Nearest integer to x, rounding half away from zero.
Truncates the fractional part of x.
Natural logarithm of x.
Base-2 logarithm of x.
Base-10 logarithm of x.
e raised to the power of x.
Absolute value of x.
Returns true if x is NaN.
Returns true if x is ±infinity.
Returns true if x is finite (not NaN and not infinite).
Returns the next representable float after x in the direction of y.
Converts degrees to radians: degrees * PI / 180.0.
Converts radians to degrees: radians * 180.0 / PI.
Linear interpolation: a + (b - a) * clamp(t, 0, 1).
load std.math as m
let s = m.sin(m.PI / 2.0)
let r = m.sqrt(16.0)
let l = m.ln(m.E)
let deg = m.radians_to_degrees(m.PI)
let n = m.is_nan(0.0 / 0.0)