# Mathematical functions

FunctionResult
int int( any value)This function converts between any data type and an integer value.
float float( any value)

This function converts between any data type and an floating piont value.

float ceil( float x)

Returns the ceiling of the x as a float, the smallest integer values greater than or equal to x.

float copysign(float x, float y)

Returns x with the sign of ycopysign(2,-1) returns -2.

float fabs( float x)Returns the absolute value of x
int factorial( int x)

Returns x factorial. Fails if x is not an integer or is negative.

float floor( float x)

Returns the largest integer value less than or equal to x.

float fmod( float x, float y)

Returns x modulus y.

float frexp( float x)

Returns x with the mantissa and the exponent as separate components of a pair m,e), such that $//$
To use one or the other, you must refer to them as a subscript, thus  for the mantissa and  as the exponent.

float fsum( [any value]...)

Returns the sum of all values in the list.

bool isinf( float x)Returns True if x is infinte, False otherwise.
bool isnan( float x)

Returns True if x is the IEEE NAN value, False otherwise.

float ldexp( float x, int i)

Returns $//$

float modf( float x)

Returns the fractional and integer parts of x as a pair (f,i) such that x=f+i. To use the individual components, they must be accessed by subscript, thus  for the fraction and  for the integer.

float trunc( float x)

Returns x truncated.

float exp( float x)

Returns $//$

float log(float x[, float base])

Returns the natural logarithm of x if there is only one parameter. Returns the logarithm of x given base, calculated as $//$.

float log1p( float x)Returns the natural logarithm of 1+x (base e)
float log10( float x)Returns the base-10 logarithm of x. Generally more accurate than log(x,10)
float sqrt( float x)

Returns the square root of x.

float pow( float x, float y)

Returns $//$