math
relationalai.semantics.std
Mathematical functions.
This module provides comprehensive mathematical functions including:
- Basic operations
- Power and logarithmic functions
- Trigonometric functions
- Hyperbolic functions
- Comparison functions
- Float checks
Functions
Section titled “Functions”Functions exposed by this module.
abs() Compute the absolute value.
ceil() Round up to the nearest integer.
clip() Clip (clamp) a value to a range.
factorial() Compute the factorial of a non-negative integer.
floor() Round down to the nearest integer.
isclose() Check if two values are approximately equal within a tolerance.
sign() Compute the sign of a number.
trunc_divide() Perform truncated division.
maximum() Find the maximum of two values.
minimum() Find the minimum of two values.
isinf() Check if a float value is infinite.
isnan() Check if a float value is NaN (Not a Number).
cbrt() Compute the cube root.
sqrt() Compute the square root.
exp() Compute the exponential function (e^value).
pow() Raise a base to an exponent.
natural_log() Compute the natural logarithm (ln).
log() Compute the logarithm with optional base.
log2() Compute the base-2 logarithm.
log10() Compute the base-10 logarithm.
degrees() Convert radians to degrees.
radians() Convert degrees to radians.
cos() Compute the cosine.
sin() Compute the sine.
tan() Compute the tangent.
cot() Compute the cotangent.
acos() Compute the arccosine (inverse cosine).
asin() Compute the arcsine (inverse sine).
atan() Compute the arctangent (inverse tangent).
acot() Compute the arccotangent (inverse cotangent).
cosh() Compute the hyperbolic cosine.
sinh() Compute the hyperbolic sine.
tanh() Compute the hyperbolic tangent.
acosh() Compute the inverse hyperbolic cosine.
asinh() Compute the inverse hyperbolic sine.
atanh() Compute the inverse hyperbolic tangent.
erf() Compute the error function.
erfinv() Compute the inverse error function.
haversine() Compute the haversine distance between two points on a sphere.