### Math Functions

The math functions perform mathematical operations.

### Abs

Calculates the absolute value of a numerical expression.

Syntax:

ABS (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Acos

Calculates the arc cosine of a numerical expression.

Syntax:

ACOS (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Asin

Calculates the arc sine of a numerical expression.

Syntax:

ASIN (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Atan

Calculates the arc tangent of a numerical expression.

Syntax:

ATAN (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Atan2

Calculates the arc tangent of y/x, where y is the first numerical expression and x is the second numerical expression.

Syntax:

ATAN2 (n_expression1, n_expression2)

where:

 n_expression (1 and 2) Any expression that evaluates to a numerical value.

### Ceiling

Rounds a noninteger numerical expression to the next highest integer. If the numerical expression evaluates to an integer, the Ceiling function returns that integer.

Syntax:

CEILING (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Cos

Calculates the cosine of a numerical expression.

Syntax:

COS (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Cot

Calculates the cotangent of a numerical expression.

Syntax:

COT (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Degrees

Converts an expression from radians to degrees.

Syntax:

DEGREES (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Exp

Calculates the value e to the power specified.

Syntax:

EXP (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Floor

Rounds a noninteger numerical expression to the next lowest integer. If the numerical expression evaluates to an integer, the FLOOR function returns that integer.

Syntax:

FLOOR (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Log

Calculates the natural logarithm of an expression.

Syntax:

LOG (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Log10

Calculates the base 10 logarithm of an expression.

Syntax:

LOG10 (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Mod

Divides the first numerical expression by the second numerical expression and returns the remainder portion of the quotient.

Syntax:

MOD (n_expression1, n_expression2)

where:

 n_expression (1 and 2) Any expression that evaluates to a numerical value.

### Pi

Returns the constant value of pi (the circumference of a circle divided by the diameter of a circle).

Syntax:

PI()

### Power

Takes the first numerical expression and raises it to the power specified in the second numerical expression.

Syntax:

POWER(n_expression1, n_expression2)

where:

 n_expression (1 and 2) Any expression that evaluates to a numerical value.

Converts an expression from degrees to radians.

Syntax:

where:

 n_expression Any expression that evaluates to a numerical value.

### Rand

Returns a pseudo-random number between 0 and 1.

Syntax:

RAND()

### RandFromSeed

Returns a pseudo-random number based on a seed value. For a given seed value, the same set of random numbers are generated.

Syntax:

RAND (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Round

Rounds a numerical expression to n digits of precision.

Syntax:

ROUND (n_expression, n)

where:

 n_expression Any expression that evaluates to a numerical value. n Any positive integer representing the number of digits of precision (that is, the number of decimal places) to which to round.

Example:

ROUND (12.358,2)

Returns:

12.36

### Sign

Returns a value of 1 if the numerical expression argument evaluates to a positive number, a value of -1 if the numerical expression argument evaluates to a negative number, and 0 if the numerical expression argument evaluates to zero.

Syntax:

SIGN (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Sin

Calculates the sine of a numerical expression.

Syntax:

SIN (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Sqrt

Calculates the square root of the numerical expression argument. The numerical expression has to evaluate to a nonnegative number.

Syntax:

SQRT (n_expression)

where:

 n_expression Any expression that evaluates to a nonnegative numerical value.

### Tan

Calculates the tangent of a numerical expression.

Syntax:

TAN (n_expression)

where:

 n_expression Any expression that evaluates to a numerical value.

### Truncate

Truncates a decimal number to return a specified number of decimal places.

Syntax:

TRUNCATE (n_expression, n)

where:

 n_expression Any expression that evaluates to a numerical value. n Any positive integer representing the number of decimal places that are returned.

Example:

TRUNCATE (12.358,2)

Returns:

12.35