[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

__Function:__int**random***([int*`mod`])`mod`must be a positive integer; otherwise,`E_INVARG`

is raised. An integer is chosen randomly from the range`[1..`

and returned. If`mod`]`mod`is not provided, it defaults to the largest MOO integer, 2147483647.

__Function:__num**min***(num*`x`, ...)__Function:__num**max***(num*`x`, ...)- These two functions return the smallest or largest of their arguments,
respectively. All of the arguments must be numbers of the same kind (i.e.,
either integer or floating-point); otherwise
`E_TYPE`

is raised.

__Function:__num**abs***(num*`x`)- Returns the absolute value of
`x`. If`x`is negative, then the result is`-`

; otherwise, the result is`x``x`. The number`x`can be either integer or floating-point; the result is of the same kind.

__Function:__str**floatstr***(float*`x`, int`precision`[,`scientific`])- Converts
`x`into a string with more control than provided by either`tostr()`

or`toliteral()`

.`Precision`is the number of digits to appear to the right of the decimal point, capped at 4 more than the maximum available precision, a total of 19 on most machines; this makes it possible to avoid rounding errors if the resulting string is subsequently read back as a floating-point value. If`scientific`is false or not provided, the result is a string in the form`"MMMMMMM.DDDDDD"`

, preceded by a minus sign if and only if`x`is negative. If`scientific`is provided and true, the result is a string in the form`"M.DDDDDDe+EEE"`

, again preceded by a minus sign if and only if`x`is negative.

__Function:__float**sqrt***(float*`x`)- Returns the square root of
`x`. Raises`E_INVARG`

if`x`is negative.

__Function:__float**sin***(float*`x`)__Function:__float**cos***(float*`x`)__Function:__float**tan***(float*`x`)- Returns the sine, cosine, or tangent of
`x`, respectively.

__Function:__float**asin***(float*`x`)__Function:__float**acos***(float*`x`)- Returns the arc-sine or arc-cosine (inverse sine or cosine) of
`x`, in the range`[-pi/2..pi/2]`

or`[0..pi]`

, respectively. Raises`E_INVARG`

if`x`is outside the range`[-1.0..1.0]`

.

__Function:__float**atan***(float*`y`[, float`x`])- Returns the arc-tangent (inverse tangent) of
`y`in the range`[-pi/2..pi/2]`

if`x`is not provided, or of

in the range`y`/`x``[-pi..pi]`

if`x`is provided.

__Function:__float**sinh***(float*`x`)__Function:__float**cosh***(float*`x`)__Function:__float**tanh***(float*`x`)- Returns the hyperbolic sine, cosine, or tangent of
`x`, respectively.

__Function:__float**exp***(float*`x`)- Returns
`e`raised to the power of`x`.

__Function:__float**log***(float*`x`)__Function:__float**log10***(float*`x`)- Returns the natural or base 10 logarithm of
`x`. Raises`E_INVARG`

if`x`is not positive.

__Function:__float**ceil***(float*`x`)- Returns the smallest integer not less than
`x`, as a floating-point number.

__Function:__float**floor***(float*`x`)- Returns the largest integer not greater than
`x`, as a floating-point number.

__Function:__float**trunc***(float*`x`)- Returns the integer obtained by truncating
`x`at the decimal point, as a floating-point number. For negative`x`, this is equivalent to`ceil()`

; otherwise it is equivalent to`floor()`

.

[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |

This document was generated on