Numeric Functions

Integer Functions

The following standard functions (defined in the BasicMathPackage but excluded if using a raw Engine) operate on i8, i16, i32, i64, f32 and f64 only:

FunctionNo available underDescription
absabsolute value
signreturns -1 (INT) if the number is negative, +1 if positive, 0 if zero

Floating-Point Functions

The following standard functions (defined in the BasicMathPackage but excluded if using a raw Engine) operate on f64 only:

CategoryFunctions
Trigonometrysin, cos, tan, sinh, cosh, tanh in degrees
Arc-trigonometryasin, acos, atan, asinh, acosh, atanh in degrees
Square rootsqrt
Exponentialexp (base e)
Logarithmicln (base e), log10 (base 10), log (any base)
Roundingfloor, ceiling, round, int, fraction methods and properties
Conversionto_int
Testingis_nan, is_finite, is_infinite methods and properties

Conversion Functions

The following standard functions (defined in the BasicMathPackage but excluded if using a raw Engine) parse numbers:

FunctionNo available underDescription
to_floatno_floatconverts an integer type to FLOAT
parse_intconverts a string to INT with an optional radix
parse_floatno_floatconverts a string to FLOAT