YASLβs math library has the following functions and constants.
| Name | Description | |ββ|ββββ-| | pi | 3.14β¦ | | nan | Floating point NaN constant | | inf | Floating point Infinity constant |
| Name | Arguments | Description | |ββ|ββββ|ββββ-| | abs | n | Returns the absolute value of n. | | exp | n | Returns e raised to the n. | | log | n | Returns the natural logarithm of n. | | sqrt | n | Returns the square root of n. | | cos | n | Returns cosine of n. | | sin | n | Returns sine of n. | | tan | n | Returns tangent of n. | | acos | n | Returns arccosine of n. | | asin | n | Returns arcsine of n. | | atan | n | Returns arctangent of n. | | ceil | n | Returns the ceiling of n. | | floor | n | Returns the floor of n. | | max | argsβ¦ | Returns the maximum of args. | | min | argsβ¦ | Returns the minimum of args. | | deg | n | Converts n from radians to degrees. | | rad | n | Converts n from degrees to radians. | | isprime | n | Returns true if n is prime, otherwise false. | | gcd | a, b | Returns the greatest common divisor of a and b. | | lcm | a, b | Returns the lowest common multiple of a and b. | | rand | | Produces a random int. |