Mathematical Functions


  • ROUND Rounds a number to a specified number of digits.
  • ROUND_UP Rounds a number up, away from zero.
  • ROUND_DOWN Rounds a number down, toward zero.
  • CINT Rounds a number down to the nearest integer.
  • CEILING Rounds a number to the nearest integer or to the nearest multiple of significance.
  • FLOOR Rounds number down, toward zero, to the nearest multiple of significance.
  • ABS Returns the absolute value of a number.
  • MAX Returns the maximum value from the list of value arguments.
  • MIN Returns the minimum value from the list of value arguments.
  • SUM Returns the total sum of arguments.
  • AVERAGE Returns the average (arithmetic mean) of arguments.
  • SIGN Returns the sign of a number.
  • FMOD Returns the remainder from division.
  • POWER Returns the result of a number raised to a power.
  • EXP Returns e raised to the power of a given number.
  • LOG Returns the logarithm of a number to a specified base.
  • LOG10 Returns the base-10 logarithm of a number.
  • SQRT Returns a positive square root.
  • SIN Returns the sine of the given angle.
  • SINH Returns the hyperbolic sine of a number.
  • ASIN Returns the arcsine of a number.
  • ASINH Returns the inverse hyperbolic sine of a number.
  • COS Returns the cosine of a number.
  • COSH Returns the hyperbolic cosine of a number.
  • ACOS Returns the arccosine of a number.
  • ACOSH Returns the inverse hyperbolic cosine of a number.
  • TAN Returns the tangent of a number.
  • TANH Returns the hyperbolic tangent of a number.
  • ATAN Returns the arctangent of a number.
  • ATANH Returns the inverse hyperbolic tangent of a number.

ROUND

Rounds a number to a specified number of digits.

number ROUND( number, [num_digits] )

Note: The default value of the optional parameter num_digits is zero.

Examples:

ROUND( 20.567, 1 ) //return the number 20.6

ROUND( 125.23, -1 ) //return the number 130

ROUND_UP

Rounds a number up, away from zero.

number ROUND_UP( number, [num_digits] )

Note: The default value of the optional parameter num_digits is zero.

Examples:

ROUND_UP( 20.267, 1 ) //return the number 20.3

ROUND_UP( 122.23, -1 ) //return the number 130

ROUND_DOWN

Rounds a number down, toward zero.

number ROUND_DOWN( number, [num_digits] )

Note: The default value of the optional parameter num_digits is zero.

Examples:

ROUND_DOWN( 20.567, 1 ) //return the number 20

ROUND_DOWN( 128.23, -1 ) //return the number 120

CINT

Rounds a number down to the nearest integer.

number CINT( number )

CEILING

Rounds a number to the nearest integer or to the nearest multiple of significance.

number CEILING( number, num_base )

Examples:

CEILING( 20.567, 0.5 ) //return the number 21

CEILING( 20.567, 5 ) //return the number 25

FLOOR

Rounds number down, toward zero, to the nearest multiple of significance.

number FLOOR( number, num_base )

Examples:

FLOOR( 20.567, 0.5 ) //return the number 20.5

FLOOR( 20.567, 5 ) //return the number 20

ABS

Returns the absolute value of a number.

number ABS( number )

MAX

Returns the maximum value from the list of value arguments.

number MAX( number1, number2, [number3,...] )

Examples:

MAX( 20, 30 ) //return the number 30

MAX( 20, 5, 8, 12, 60 ) //return the number 60

MIN

Returns the minimum value from the list of value arguments.

number MIN( number1, number2, [number3,...] )

Examples:

MIN( 20, 30 ) //return the number 20

MIN( 20, 5, 8, 12, 60 ) //return the number 5

SUM

Returns the total sum of arguments.

number SUM( number1, number2, [number3,...] )

Examples:

SUM( 20, 30 ) //return the number 50

SUM( 20, 5, 8, 12, 60 ) //return the number 105

AVERAGE

Returns the average (arithmetic mean) of arguments.

number AVERAGE( number1, number2, [number3,...] )

Examples:

AVG( 20, 30 ) //return the number 25

AVG( 20, 5, 8, 12, 60 ) //return the number 21

SIGN

Returns the sign of a number.

boolean SIGN( number )

Note: This function returns FALSE if the number is less than zero, otherwise, it returns TRUE.

FMOD

Returns the remainder from division.

number FMOD( number ,[divisor] )

Note: The default value of the optional parameter divisor is 1. This function uses the following formula:

FMOD( number, divisor ) = number - divisor * CINT( number / divisor ).

Examples:

FMOD( 20.567 ) //return the number 0.567

FMOD( 20.567, 3 ) //return the number 2.567

POWER

Returns the result of a number raised to a power.

number POWER( number, num_power )

EXP

Returns e raised to the power of a given number.

number EXP( num_power )

LOG

Returns the logarithm of a number to a specified base.

number LOG( number, num_base )

LOG10

Returns the base-10 logarithm of a number.

number LOG10( number )

SQRT

Returns a positive square root.

number SQRT( number )

SIN

Returns the sine of the given angle.

number SIN( number )

ASIN

Returns the arcsine of a number.

number ASIN( number )

SINH

Returns the hyperbolic sine of a number.

number SINH( number )

ASINH

Returns the inverse hyperbolic sine of a number.

number ASINH( number )

COS

Returns the cosine of a number.

number COS( number )

ACOS

Returns the arccosine of a number.

number ACOS( number )

COSH

Returns the hyperbolic cosine of a number.

number COSh( number )

ACOSH

Returns the inverse hyperbolic cosine of a number.

number ACOSH( number )

TAN

Returns the tangent of a number.

number TAN( number )

ATAN

Returns the hyperbolic tangent of a number.

number ATAN( number )

TANH

Returns the arctangent of a number.

number TANH( number )

ATANH

Returns the inverse hyperbolic tangent of a number.

number ATANH( number )