Math

From AgileApps Support Wiki
Revision as of 02:36, 16 June 2009 by imported>Evelyn
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Mathematical Formula Functions:

ABS

CEIL

EXP

FLOOR

LN

LOG

MAX

MIN

MOD

POW

ROUND

SQRT

VALUE


ABS

The ABS function calculates the absolute value of a number.

Syntax
ABS(number)
Return
A positive number
Examples
ABS(-23) = 23
ABS(14) = 14
ABS(11 - 23) = 12

CEIL

The CEIL function rounds a number up to the next whole number. The function name derives from the word "ceiling".

Syntax
CEIL(number)
Return
Number (whole number or integer)
Example
CEIL(210.6465) = 211
CEIL(2.00001) = 3

EXP

The EXP function returns e raised to the power of a number. EXP is the inverse of LN. The numerical value of e truncated to 10 decimal points is 2.7182818285.

Syntax
EXP(number)
Return
Number
Examples
EXP(1) = 2.7183
EXP(3) = 8.1548

FLOOR

The FLOOR function rounds a number down to the next whole number.

Syntax
FLOOR(number)
Return
Number (whole number or integer)
Examples
FLOOR(210.6465) = 210
FLOOR(2.99999) = 2

LN

The LN function calculates the natural logarithm of a number. LN is the inverse of EXP. Natural logarithms are based on the constant e, whose value truncated to 10 decimal points is 2.7182818285.

Syntax
LN(number)
Return
Number
Examples
LN(2.7183) = 1
LN(12) = 4.4246

LOG

The LOG function calculates the base-10 logarithm for a number.

Syntax
LOG(number)
Return
Number
Examples
LOG(10) = 1
LOG(1000) = 3

MAX

The MAX function evaluates two numbers and returns the number with the greater value.

Syntax
MAX(number1, number2)
Return
Number
Examples
MAX(1, 2) = 2
MAX(2, 1) = 2

MIN

The MIN function evaluates two numbers and returns the number with the lesser value.

Syntax

MIN(number1, number2)

Return

A number

Example

MIN(1, 2) = 1
MIN(2, 1) = 1

MOD

The MOD function returns the remainder after dividing the first argument by the second argument.

Syntax

MOD(number, divisor)

Return

A number

Example

MOD(7, 2) = 1
MOD(14, 5) = 4

POW

The POW function multiplies a number by an exponent or power.

Syntax
POW(number, exponent)
Return
Number
Examples
POW(10, 2) = 100
POW(3, 3) = 27

ROUND

The ROUND function rounds a number up to the closest whole number. Optionally, specify the number of significant digits to the right of the decimal point (precision).

Syntax
ROUND(number, precision)
Return
Number
Examples
ROUND(210.6465, 3) = 210.647
ROUND(5.5555) = 6

SQRT

The SQRT function returns the square root of a number.

Syntax
SQRT(number)
Return
Number
Examples
SQRT(16) = 4
SQRT(100) = 10

VALUE

The VALUE function converts a text string with numbers into a number. Since field values are typically returned as strings, this function is used to convert the value to a number.

Syntax
VALUE(string-expression)
The string-expression is usually a field name, but may be more complex
Return
Number
Example
VALUE(priority)
Returns 1, 2, 3, etc. depending on the priority-field setting