Mathematical Functions
Mathematical functions take numeric arguments and produce numeric results.
-
ABS(X)
Results in the absolute value ofX. -
EXP(EXPONENT)
Returns e (approximately 2.71828) raised to powerEXPONENT. -
LG10(X)
Takes the base-10 logarithm ofX. IfXis not positive, the result is system-missing. -
LN(X)
Takes the base-e logarithm ofX. IfXis not positive, the result is system-missing. -
LNGAMMA(X)
Yields the base-e logarithm of the complete gamma ofX. IfXis a negative integer, the result is system-missing. -
MOD(A, B)
Returns the remainder (modulus) ofAdivided byB. IfAis 0, then the result is 0, even ifBis missing. IfBis 0, the result is system-missing. -
MOD10(X)
Returns the remainder whenXis divided by 10. IfXis negative,MOD10(X)is negative or zero. -
RND(X [, MULT[, FUZZBITS]])
RoundsXand rounds it to a multiple ofMULT(by default 1). Halves are rounded away from zero, as are values that fall short of halves by less thanFUZZBITSof errors in the least-significant bits of X. IfFUZZBITSis not specified then the default is taken fromSET FUZZBITS, which is 6 unless overridden. -
SQRT(X)
Takes the square root ofX. IfXis negative, the result is system-missing. -
TRUNC(X [, MULT[, FUZZBITS]])
RoundsXto a multiple ofMULT, toward zero. For the defaultMULTof 1, this is equivalent to discarding the fractional part ofX. Values that fall short of a multiple ofMULTby less thanFUZZBITSof errors in the least-significant bits ofXare rounded away from zero. IfFUZZBITSis not specified then the default is taken fromSET FUZZBITS, which is 6 unless overridden.