Std.Math.Float
39 public declarations
- abs
Float64 -> Float64The absolute value of a float.
- acos
Float64 -> Option[Float64]Computes arc cosine in radians. Returns None if |x| > 1.
- asin
Float64 -> Option[Float64]Computes arc sine in radians. Returns None if |x| > 1.
- atan
Float64 -> Float64Computes arc tangent in radians across (-pi/2, pi/2).
- atan2
Float64 -> Float64 -> Float64Computes 4-quadrant arc tangent atan2(y, x).
- cbrt
Float64 -> Float64Cube root via Halley's iteration. Preserves negative sign.
- ceil
Float64 -> Float64The smallest integer float not less than x.
- clamp
Float64 -> Float64 -> Float64 -> Float64Confines a floating-point value to [lower, upper].
- copysign
Float64 -> Float64 -> Float64Produces a value with the magnitude of first argument and sign of second.
- cos
Float64 -> Float64Computes cosine in radians.
- cosh
Float64 -> Float64Hyperbolic cosine (e^x + e^-x) / 2.
- degrees
Float64 -> Float64Converts an angle in radians to degrees.
- e
Float64Euler's number e (base of natural logarithms).
- epsilon
Float64Machine epsilon for 64-bit IEEE-754 floating point (2^-52).
- exp
Float64 -> Float64Computes e^x using range reduction and Taylor polynomial.
- floor
Float64 -> Float64The greatest integer float not greater than x.
- fract
Float64 -> Float64Returns the fractional part of a float (x - trunc(x)).
- hypot
Float64 -> Float64 -> Float64Euclidean distance sqrt(x^2 + y^2) scaled to avoid overflow/underflow.
- isFinite
Float64 -> BoolWhether the value is a valid finite real number (neither NaN nor infinite).
- isInfinite
Float64 -> BoolWhether the value is positive or negative infinity.
- isNan
Float64 -> BoolWhether the value is IEEE-754 NaN.
- lerp
Float64 -> Float64 -> Float64 -> Float64Linearly interpolates between a and b by amount t.
- ln
Float64 -> Option[Float64]Natural logarithm ln(x). Returns None if x <= 0.
- ln10
Float64Natural logarithm of 10.
- ln2
Float64Natural logarithm of 2.
- log10
Float64 -> Option[Float64]Base-10 logarithm log10(x). Returns None if x <= 0.
- log2
Float64 -> Option[Float64]Base-2 logarithm log2(x). Returns None if x <= 0.
- pi
Float64The mathematical constant pi (ratio of a circle's circumference to diameter).
- powf
Float64 -> Float64 -> Option[Float64]Floating power base^exponent. Returns None on invalid negative base with non-integer power.
- radians
Float64 -> Float64Converts an angle in degrees to radians.
- round
Float64 -> Float64Rounds half away from zero to nearest integer float.
- sin
Float64 -> Float64Computes sine in radians.
- sinh
Float64 -> Float64Hyperbolic sine (e^x - e^-x) / 2.
- sqrt
Float64 -> Option[Float64]Square root via Newton-Raphson iteration. Returns None if x < 0.
- sqrt2
Float64Square root of 2.
- tan
Float64 -> Float64Computes tangent in radians.
- tanh
Float64 -> Float64Hyperbolic tangent (e^2x - 1) / (e^2x + 1).
- tau
Float64The circle constant tau (2 * pi, full turn in radians).
- trunc
Float64 -> Float64Truncates the fractional part, rounding toward zero.
