Syncopation Software

DPL 9 Help

Arithmetic Functions

Arithmetic Functions

DPL contains the standard arithmetic functions found in most programming languages and spreadsheets. The arithmetic functions are listed below. All the arguments of these functions (x and y) are expressions.

  • abs(x) - The absolute value of x.

  • exp(x) - The number e (2.718281828459045) raised to the xth power. The argument of exp( ) cannot be larger than 709. Otherwise exp( ) will produce a number larger than DPL can store or process.

  • log(x) - The natural logarithm (base e) of x. Not defined if the argument is 0 or negative.

  • log10(x) - The logarithm (base 10) of x. Not defined if the argument is 0 or negative.

  • max(x,...) - The maximum of the expressions in the argument list.

  • min(x,...) - The minimum of the expressions in the argument list.

  • mod(x,y) - The remainder when x is divided by y. Both arguments can be any positive or negative number, but the second argument cannot be 0. The sign of the number returned by this function is always the same as that of its first argument.

  • pow(x,y) - x raised to the yth power. The absolute value of the number this function produces must be less than 1.79769E+308 otherwise DPL will not be able to store or process the result. If the first argument is not 0 and the second is 0, pow( ) returns the number 1. The function is not defined if both arguments are 0, or if the first argument is 0 and the second is negative, or if the first argument is negative and the second is not an integer. The exponentiation operator (^) is equivalent to the pow function.

  • sqrt(x) - The positive square root of x. The function sqrt( ) is not defined if its argument is negative.

Versions: DPL Professional, DPL Enterprise, DPL Portfolio