-
Notifications
You must be signed in to change notification settings - Fork 0
stdmath
Provides basic mathematical functions.
Contains value for Pi constant (float) stdmath.pi -> 3.141592653589793
.
Returns whether argument (float) is an IEEE 754 “not-a-number” value.
type: function
Format:
call(stdmath.is-nan <float>) -> <bool>
Return value: bool
Returns whether 1st argument (float) is an infinity, according to sign (if defined by 2nd argument).
If one argument is given is-inf returns if 1st argument is either positive or negative infinity. If two arguments are given, if 2nd argument specifies which infinity is checked:
2nd argument | meaning |
---|---|
'+' | positive infinity is checked |
'-' | negative infinity is checked |
type: function
Format:
call(stdmath.is-inf <float>) -> <bool>
call(stdmath.is-inf <float> <sign-string>) -> <bool>
Return value: bool
Returns the absolute value of argument (float).
type: function
Format:
call(stdmath.abs <float>) -> <float>
Return value: float
Returns the arccosine, in radians, of argument (float).
type: function
Format:
call(stdmath.acos <float>) -> <float>
Return value: float
Returns the inverse hyperbolic cosine of argument (float).
type: function
Format:
call(stdmath.acosh <float>) -> <float>
Return value: float
Returns the arcsine, in radians, of argument (float).
type: function
Format:
call(stdmath.asin <float>) -> <float>
Return value: float
Returns the inverse hyperbolic sine of argument (float).
type: function
Format:
call(stdmath.asinh <float>) -> <float>
Return value: float
Returns the arctangent, in radians, of argument (float).
type: function
Format:
call(stdmath.atan <float>) -> <float>
Return value: float
Returns the inverse hyperbolic tangent of argument (float).
type: function
Format:
call(stdmath.atanh <float>) -> <float>
Return value: float
Returns the cosine of the radian argument argument (float).
type: function
Format:
call(stdmath.cos <float>) -> <float>
Return value: float
Returns the hyperbolic cosine of argument (float).
type: function
Format:
call(stdmath.cosh <float>) -> <float>
Return value: float
Returns the sine of the radian argument (float).
type: function
Format:
call(stdmath.sin <float>) -> <float>
Return value: float
Returns the hyperbolic sine of argument (float).
type: function
Format:
call(stdmath.sinh <float>) -> <float>
Return value: float
Returns the tangent of the radian argument (float).
type: function
Format:
call(stdmath.tan <float>) -> <float>
Return value: float
Returns the hyperbolic tangent of argument (float).
type: function
Format:
call(stdmath.tanh <float>) -> <float>
Return value: float
Returns the least integer value greater than or equal to argument (float).
type: function
Format:
call(stdmath.ceil <float>) -> <float>
Return value: float
Returns the greatest integer value less than or equal to argument (float).
type: function
Format:
call(stdmath.floor <float>) -> <float>
Return value: float
Returns the integer value of argument (float).
type: function
Format:
call(stdmath.trunc <float>) -> <float>
Return value: float
Breaks argument (float) into a normalized fraction and an integral power of two. It returns frac and exp satisfying argument == frac × 2**exp, with the absolute value of frac in the interval (0.5, 1).
type: function
Format:
call(stdmath.frexp <float>) -> <list>
Return value: list
List contains 2 items:
- normalized fraction (float)
- integral power of two (int)
Is the inverse of frexp. It returns frac × 2**exp.
type: function
Format:
call(stdmath.ldexp <frac-float> <exp-int>) -> <float>
Return value: float
Returns integer and fractional floating-point numbers that sum to argument (float). Both values have the same sign as argument.
type: function
Format:
call(stdmath.modf <float>) -> <list>
Return value: list
List contains 2 items:
- integer part (float)
- fractional (float)
Returns the IEEE 754 floating-point remainder of 1st argument/2nd argument (both arguments are float type).
type: function
Format:
call(stdmath.remainder <float> <float>) -> <float>
Return value: float
Returns e**x, the base-e exponential of argument (float).
type: function
Format:
call(stdmath.exp <float>) -> <float>
Return value: float
Returns 2**x, the base-2 exponential of argument (float).
type: function
Format:
call(stdmath.exp2 <float>) -> <float>
Return value: float
Returns 2x, the base-2 exponential of argument (float). Returns ex - 1, the base-e exponential of argument (float) minus 1. It is more accurate than minus(call(stdmath.exp x) 1) when x is near zero.
type: function
Format:
call(stdmath.expm1 <float>) -> <float>
Return value: float
Returns the natural logarithm of argument (float).
type: function
Format:
call(stdmath.log <float>) -> <float>
Return value: float
Returns the decimal logarithm of argument (float).
type: function
Format:
call(stdmath.log10 <float>) -> <float>
Return value: float
Returns the natural logarithm of 1 plus its argument (float).
type: function
Format:
call(stdmath.log1p <float>) -> <float>
Return value: float
Returns the binary logarithm of argument (float).
type: function
Format:
call(stdmath.log2 <float>) -> <float>
Return value: float
Returns the binary exponent of argument (float).
type: function
Format:
call(stdmath.logb <float>) -> <float>
Return value: float
Returns x**y, the base-x exponential of y, where x is 1st argument (float) and y is 2nd argument (float).
type: function
Format:
call(stdmath.pow <x-float> <y-float>) -> <float>
Return value: float
Returns the square root of argument (float).
type: function
Format:
call(stdmath.sqrt <float>) -> <float>
Return value: float
Returns the cube root of argument (float).
type: function
Format:
call(stdmath.sqrt <float>) -> <float>
Return value: float