Math rule functions

This topic describes the available math rule functions.

ABS

Returns the absolute value of a number.

Syntax

ABS(Value)

Where Value is a number, or a formula that returns a number.

Example

ABS(-2.1) returns "2.1"

ABS(5.4) returns "5.4"

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

ACOS

Returns an angle in radians, whose cosine is a specified value.

Syntax

ACOS(Value)

Where Value is a number between -1 and 1 or a formula which returns a value between -1 and 1. If Value is outside of these bounds, the result is undefined.

Example

ACOS(0) returns "1.5708" radians (pi/2 or 90 degrees)

ACOS(1) returns "0"

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

ASIN

Displays an angle in radians, whose sine is a specified value.

Syntax

ASIN(Value)

Where Value is a number between -1 and 1, or a formula which returns a value between -1 and 1. If Value is outside of these bounds, the result is undefined.

Example

ASIN(1) returns "1.5708" radians (pi/2 or 90 degrees)

ASIN(0) returns "0"

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

ATAN

Returns an angle in radians, with a tangent of a specifed angle. The result is between -pi/2 and +pi/2.

Syntax

ATAN(Value)

Where Value is a number or a formula that returns a number.

Example

ATAN(1) returns "0.7854" radians (pi/4 or 45 degrees)

ATAN(0) returns "0" radians

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

COS

Returns the cosine of an angle.

Syntax

COS(Value)

Where Value is an angle in radians, or a formula which returns and angle in radians.

Example

COS(0) returns "1"

COS(1.5708) returns "0"

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

EXP

Returns the natural anti-logarithm of a value.

Syntax

EXP(Value)

Where Value is a number.

Examples

EXP(0) returns "1"

EXP(1) returns "2.71828182845905"

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

INT

Returns the integer resulting from truncating a number.

Syntax

INT(Value)

Where Value is a number or a formula resulting in a number. If Value is positive, the result is the largest integer less than or equal to Value. If Value is negative, the result is the smallest integer greater than or equal to Value.

Examples

INT(7.8) returns "7"

INT(-7.8) returns "-7"

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

ISNULL

Determines whether a cell is empty

Syntax

ISNULL(cube, Elem1, Elem2 ...)

Cube is the name of the cube; Elem1, Elem2... are the cells in this cube.

LN

Returns the natural (base) logarithm of a value.

Syntax

LN(Value)

Where Value is any positive number. If Value is negative or zero, the result is undefined.

Examples

LN(1) returns "0"

LN(2.71828) returns "1"

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

LOG

Returns the logarithm (base 10) of a number.

Syntax

LOG(Value)

Value is any positive number. If Value is negative or zero, the result is undefined.

Examples

LOG(1) returns "0"

LOG(10) returns "1"

Syntax

MAX(Value1, Value2)

Where both arguments are numbers, or formulas which return numbers.

Example

MAX(100, 10) returns "100"

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

MIN

Returns the smaller of two values.

Syntax

MIN(Value1, Value2)

Where both arguments are numbers, or formulas which return numbers.

Example

MIN(100, 10) returns "10"

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

MOD

Returns the remainder resulting from dividing one number by another.

Syntax

MOD(Value1, Value2)

Where both arguments are numbers, or formulas which return numbers.

Examples

MOD(100, 10) returns "0"

MOD(102,10) returns "2"

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

PI

Returns 3.1415927.

Syntax

PI

This function has no arguments.

ROUND

Return a value rounded to the nearest integer.

Syntax

Round(Value)

Value must be a number, or a formula that returns a number.

Examples

ROUND(3.4) returns 3.

ROUND(3.5) returns 4.

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

ROUNDP

Returns a value representing a number rounded to the nearest of a specifed number of digits.

Syntax

ROUNDP(Value, Decimals)

Where Value is the number to be rounded and Decimals is the number of decimals to which the number should be rounded. If Decimals is negative then the number will be rounded to digits to the left of the decimal separator.

Examples

ROUNDP(1.234,1) returns "1.2"

ROUNDP(2035,-1) returns "2040"

ROUNDP(1.235,2) returns "1.24"

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

SIGN

Determines whether a number is positive.

Syntax

SIGN(Value)

Value is a number, or a formula that returns a number. The function returns 1 if Value is positive, -1 if Value is negative and 0 if Value is 0.

Example

SIGN(-3.4) returns "-1"

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

SIN

Returns the sine of a number entered in radians.

Syntax

SIN(Value)

Examples

SIN(0) returns 0.

SIN(1.5708) returns 1.

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

SQRT

Returns the square root of a value.

Syntax

SQRT(Value)

Value is a number, or a formula that returns a number. If Value is negative, the result is undefined.

Example

SQRT(9) returns 3.

Note: Numbers entered as arguments in rules must be entered with a period as the decimal separator. Commas must not be used as thousands separators. This is true whatever the decimal separator indicated under your Windows international settings.

TAN

Returns the tangent of a value entered in radians.

Syntax

TAN(Value)

Example

TAN(0) returns 0.

TAN(.7854) returns 1.