Mathematical functions for real numbers.
math | Mathematical functions for real numbers. |
Constants | |
Pi | The value of Pi to 34 significant digits. |
Functions | |
abs | Absolute value. |
acos | Inverse cosine (arc cos). |
acosh | Inverse hyperbolic cosine (arc cosh). |
asin | Inverse sine (arc sin). |
asinh | Inverse hyperbolic sine (arc sinh). |
atan | Inverse tangent (arc tan). |
atanh | Inverse hyperbolic tangent (arc tanh). |
atan2 | Inverse tangent (arc tan) of y/x. |
cbrt | Cube root. |
ceil | Ceiling function. |
cos | Cosine. |
cosh | Hyperbolic cosine. |
erf | Error function. |
erfc | Complementary error function. |
exp | Exponentiation. |
exp2 | Exponentiation (base 2). |
expm1 | Calculates exp(x)-1.0. |
floor | Floor function. |
frexp | Decomposes a floating point number into a normalised fraction and an integral power of 10. |
hypot | Hypotenuse. |
intdiv | Integer division with rounding toward zero. |
ldexp | Multiplies a floating point value x by the number 10 raised to the exp power. |
lgamma | Log gamma function. |
log | Logarithm. |
log10 | Logarithm (base 10). |
log1p | Computes the natural (base e) logarithm of 1+arg. |
log2 | Logarithm (base 2). |
max | Return the greater of two numbers. |
min | Return the lesser of two numbers. |
nearbyint | Returns an integer close to x by rounding. |
odd | Return TRUE if the given number is odd. |
powmod | Calculate modular exponentiation. |
round | Round a number to a specified number of decimal places. |
sign | Returns -1 if x is negative, 0 if x is 0, or 1 if x is positive. |
sin | Sine. |
sinh | Hyperbolic sine. |
sqrt | Square root. |
tan | Tangent. |
tanh | Hyperbolic tangent. |
tgamma | Gamma function. |
trunc | Truncate to integer (effectively, round toward zero). |
DECLARE NATIVE FUNCTION abs( x: Number ): Number
Absolute value.
http://mathworld.wolfram.com/AbsoluteValue.html
ASSERT math.abs(-5) = 5
Absolute value.
DECLARE NATIVE FUNCTION abs( x: Number ): Number
Inverse cosine (arc cos).
DECLARE NATIVE FUNCTION acos( x: Number ): Number
Inverse hyperbolic cosine (arc cosh).
DECLARE NATIVE FUNCTION acosh( x: Number ): Number
Inverse sine (arc sin).
DECLARE NATIVE FUNCTION asin( x: Number ): Number
Inverse hyperbolic sine (arc sinh).
DECLARE NATIVE FUNCTION asinh( x: Number ): Number
Inverse tangent (arc tan).
DECLARE NATIVE FUNCTION atan( x: Number ): Number
Inverse hyperbolic tangent (arc tanh).
DECLARE NATIVE FUNCTION atanh( x: Number ): Number
Inverse tangent (arc tan) of y/x.
DECLARE NATIVE FUNCTION atan2( y, x: Number ): Number
Cube root.
DECLARE NATIVE FUNCTION cbrt( x: Number ): Number
Ceiling function.
DECLARE NATIVE FUNCTION ceil( x: Number ): Number
Cosine.
DECLARE NATIVE FUNCTION cos( x: Number ): Number
Hyperbolic cosine.
DECLARE NATIVE FUNCTION cosh( x: Number ): Number
Error function.
DECLARE NATIVE FUNCTION erf( x: Number ): Number
Complementary error function.
DECLARE NATIVE FUNCTION erfc( x: Number ): Number
Exponentiation.
DECLARE NATIVE FUNCTION exp( x: Number ): Number
Exponentiation (base 2).
DECLARE NATIVE FUNCTION exp2( x: Number ): Number
Calculates exp(x)-1.0.
DECLARE NATIVE FUNCTION expm1( x: Number ): Number
Floor function.
DECLARE NATIVE FUNCTION floor( x: Number ): Number
Decomposes a floating point number into a normalised fraction and an integral power of 10.
DECLARE NATIVE FUNCTION frexp( x: Number, OUT exp: Number ): Number
Hypotenuse.
DECLARE NATIVE FUNCTION hypot( x: Number, y: Number ): Number
Integer division with rounding toward zero.
DECLARE NATIVE FUNCTION intdiv( x: Number, y: Number ): Number
Multiplies a floating point value x by the number 10 raised to the exp power.
DECLARE NATIVE FUNCTION ldexp( x: Number, exp: Number ): Number
Log gamma function.
DECLARE NATIVE FUNCTION lgamma( x: Number ): Number
Logarithm.
DECLARE NATIVE FUNCTION log( x: Number ): Number
Logarithm (base 10).
DECLARE NATIVE FUNCTION log10( x: Number ): Number
Computes the natural (base e) logarithm of 1+arg.
DECLARE NATIVE FUNCTION log1p( x: Number ): Number
Logarithm (base 2).
DECLARE NATIVE FUNCTION log2( x: Number ): Number
Return the greater of two numbers.
DECLARE NATIVE FUNCTION max( a: Number, b: Number ): Number
Return the lesser of two numbers.
DECLARE NATIVE FUNCTION min( a: Number, b: Number ): Number
Returns an integer close to x by rounding.
DECLARE NATIVE FUNCTION nearbyint( x: Number ): Number
Return TRUE if the given number is odd.
DECLARE NATIVE FUNCTION odd( x: Number ): Boolean
Calculate modular exponentiation.
DECLARE NATIVE FUNCTION powmod( b, e, m: Number ): Number
Round a number to a specified number of decimal places.
DECLARE NATIVE FUNCTION round( places: Number, value: Number ): Number
Returns -1 if x is negative, 0 if x is 0, or 1 if x is positive.
DECLARE NATIVE FUNCTION sign( x: Number ): Number
Sine.
DECLARE NATIVE FUNCTION sin( x: Number ): Number
Hyperbolic sine.
DECLARE NATIVE FUNCTION sinh( x: Number ): Number
Square root.
DECLARE NATIVE FUNCTION sqrt( x: Number ): Number
Tangent.
DECLARE NATIVE FUNCTION tan( x: Number ): Number
Hyperbolic tangent.
DECLARE NATIVE FUNCTION tanh( x: Number ): Number
Gamma function.
DECLARE NATIVE FUNCTION tgamma( x: Number ): Number
Truncate to integer (effectively, round toward zero).
DECLARE NATIVE FUNCTION trunc( x: Number ): Number