Math functions
The list shows the math functions you can use in expressions.
Function | Description |
---|---|
Abs(Arg1)
|
Returns the absolute value of Arg1. The argument and the result are of type real. |
ACos(Arg1)
|
Returns the arccosine of
Arg1 as an angle expressed in radians in the
interval [0 , p ].
Arg1 must be in the interval [-1.0, 1.0],
otherwise #NA is returned. The argument and the result are of
type
Real .
|
ASin(Arg1)
|
Returns the arcsine of
Arg1 as an angle expressed in radians in the
interval [- p /2 , p /2].
Arg1 must be in the interval [-1.0, 1.0],
otherwise
#NA is returned. The argument and the result are
of type
Real .
|
ATan(Arg1)
|
Returns the arctangent of
Arg1 as an angle expressed in radians in the
interval [-PI/2 , PI/2 ]. The argument and the result are of
type
Real .
|
ATan2(Arg1,
Arg2)
|
Returns the arctangent of two arguments (y,
x) as an angle expressed in radians (in the interval
-PI and
PI ).
Arg1 is the y-coordinate and
Arg2 the x-coordinate. The signs of the
arguments are used to determine the quadrant of the result. The arguments and
the result are of type
Real .
Example:
|
Ceiling(Arg1)
|
Rounds
Arg1 up to the nearest whole number. The
argument and the result are of type
Real .
Examples:
|
Cos(Arg1)
|
Returns the cosine of
Arg1 where
Arg1 is an angle expressed in radians. The
argument and the result are of type
Real .
|
Exp(Arg1)
|
Returns e (2.718281...) raised to the
Arg1 power. The argument and the result are of
type
Real .
|
Floor(Arg1)
|
Rounds
Arg1 down to the nearest whole number. The
argument and the result are of type
Real .
Examples:
|
Ln(Arg1)
|
Returns the natural logarithm of
Arg1. The arguments and the result are of type
Real . If
Arg1 is negative, the result is a #NA
error. If
Arg1 is zero, the result is also
#NA .
|
Log(Arg1,
Arg2)
|
Returns the logarithm of
Arg1 expressed in the base specified by
Arg2. Equivalent to
Ln(Arg1)/Ln(Arg2) . The arguments
and the result are of type
Real . See function
Ln for the definition of valid arguments.
|
Log10(Arg1)
|
Returns the 10-based logarithm of
Arg1. Equivalent to
Ln(Arg1)/Ln(10) . The
arguments and the result are of type
Real . See function
Ln for the definition of valid arguments.
|
Mod(Arg1,
Arg2)
|
Returns the reminder of the division of
Arg1 by
Arg2, The arguments and the result are of type
Real . If
Arg2 is 0, the result is a
#NA error.
|
PI()
|
Returns the numerical constant π.
The result is of type
|
Power(Arg1,
Arg2)
|
Returns
Arg1 raised to the
Arg2 power. The arguments and the result are
of type
Real .
Examples:
|
Product(Arg1, ...)
|
Calculates the product of the values. If
one argument is given, then the result is the product of the entire column. If
more than one column is given, then the result is the product of each row.
The arguments and the result are of type
Examples:
|
Rand(Arg1)
|
Returns a random real number between 0.0
and 1.0.
The integer argument is a constant seed value that is used to initialize the random number generator. It also assures that the same values are generated if the column is recalculated. The seed value cannot be a column reference. Example:
|
RandBetween(Arg1,
Arg2,
Arg3)
|
Returns a random integer number within the
specified range.
The first and the second arguments set the range for the random numbers. These arguments can be constant values or integer column references. The third argument is a constant seed value that is used to initialize the random number generator. It also assures that the same values are generated if the column is recalculated. The seed value cannot be a column reference. Example:
|
Round(Arg1,
Arg2)
|
Rounds
Arg1 to the number of decimal places specified
by
Arg2. The arguments and the result are of type
Real , but for
Arg2, only the integer part is used. Note that
Arg2 can be negative to round to even 10s,
100s, etc. 0.5 is rounded upwards to a number with higher magnitude (ignoring
the sign).
Examples:
|
Sin(Arg1)
|
Returns the sine of
Arg1 where
Arg1 is an angle expressed in radians. The
argument and the result are of type
Real .
|
Sqrt(Arg1)
|
Returns the square root of
Arg1. The argument and the result are of type
Real . If
Arg1 is negative, the result is a
#NA error.
|
Sum(Arg1,
...)
|
Calculates the sum of the values. If one
argument is given, then the result is the sum of the entire column. If more
than one column is given, then the result is the sum of each row.
Null arguments are ignored and do not contribute to the sum. Examples:
|
Tan(Arg1)
|
Returns the tangent of
Arg1 where
Arg1 is an angle expressed in radians. The
argument and the result are of type
Real .
|