# The Dromesday Book

### Site Tools

lgscript:math_library

# Math Library

Mathematical functions that work with real numbers.

## abs

Absolute value.

 Returns number number

## acos

 Returns number number

## asin

 Returns number number

## atan

 Returns number number

## atan2

 Returns Parameter number number y number x

Returns the arc tangend of y/x. The signs of the parameters are used to determine the correct quadrant. The function will not fail if x is zero.

## ceil

Round to the next larger integer.

 Returns number number

## cos

 Returns number number

## cosh

Hyperbolic cosine.

 Returns number number

## deg

 Returns number number

## exp

Natural exponent.

 Returns number number

## floor

Round to the next smaller integer.

 Returns number number

## fmod

Remainder of x/y.

 Returns Parameter number number x number y

## frexp

 Returns Parameter number,number m,e number x

x=m2e

## huge

The largest possible number. A constant.

## ldexp

 Returns Parameter number x number m number e

x=m2e

## log

Natural logarithm.

 Returns number number

## log10

Logarithm base-10.

 Returns number number

## max

The largest of the given values.

 Returns number number `...`

## min

The smallest of the given values.

 Returns number number `...`

## modf

The integer and fractional parts of a number.

 Returns number,number number

## pi

The ratio of the circumference of a circle to its diameter. A constant.

## pow

Raise the first parameter to the power of the second parameter.

 Returns number number number

 Returns number number

## random

Return a slightly unpredictable number.

 Returns number number (opt.) number (opt.)

A pseudo-random number generator returns a sequence of numbers that seems to have no pattern.

If no parameters are given, then the return value is greater than or equal to 0 and less than 1. With parameters, the result is an integer. Only one parameter sets the largest number to return (the smallest is 1), and using two parameters sets the lowest and highest numbers in the range.

## randomseed

Prepare the pseudo-random number generator.

 Parameter number

## round

Round to a number of decimal digits.

 Returns Parameter number number number (opt.) Default is 0.

## sin

 Returns number number

## sinh

Hyperbolic sine.

 Returns number number

## sqrt

Square root.

 Returns number number