Math Scalar Functions

Table 126. Math Scalar Functions 

Function

Description

Abs (n)

Returns the absolute value of number n.

Example:

Abs (-3) = 3

Atn (n)

Returns arc tangent of number n radians.

Example:

Atn (1) = .7854

Ceil (n)

Returns the smallest integer value greater than or equal to number n.

Example:

Ceil (5.6) = 6

Cos (n)

Returns cosine of number n radians.

Example:

Cos (0.5) = .8776

Cosh (n)

Returns hyperbolic cosine of number n radians.

Example:

Cosh (0.5) = 1.1276

Count (c)

Returns the number of row values in c (including nulls).

Example:

Count (units) = tally of rows in units

Exp (n)

Returns e (2.718) raised to exponential power n.

Example:

Exp (4) = 54.598

Max (a,b)

Returns the larger of items a and b for each new value.

Example:

Max (7, 10) = 10

Min (a,b)

Returns the smaller of items a and b for each new value.

Example:

Min (7, 10) = 7

Mod (n,m)

Returns the integer remainder of number n divided by number m. If m is larger, the default value is n.

Example:

Mod (6,2) = 0

Power (n,m)

Returns number n raised to exponential power m.

Example:

Power (10,5) = 100,000

Round (n,m)

Returns n rounded to m decimal places. Ifm is omitted, round to 0 decimal places.

Example:

Round (5.6178,2) = 5.62

Sign (n)

Returns indicator of -1, 0, or 1 if number n is variously negative, 0, or positive.

Example:

Sign (-4) = -1

Sin (n)

Returns sine of number n radians.

Example:

Sin (86) = -0.924

Sinh (n)

Returns hyperbolic sine of number n

radians.

Example:

Sinh (.5) = .5211

Sqrt (n)

Returns square root of number n.

Example:

Sqrt (81) = 9

Tan (n)

Returns tangent of number n radians.

Example:

Tan (30) = -6.405

Tanh (n)

Returns hyperbolic tangent of number n radians.

Example:

Tanh (45) = 1

Trunc (n,m)

Returns number n truncated to number m decimal places. The default value for m is 0.

Example:

Trunc (56.0379,2) = 56.03