EXP - Returns the result of raising a number to a power.
EXP( base, exponent)
MESSAGE EXP(10, 2) VIEW-AS ALERT-BOX. // Messages 100
SQRT - Returns the square root of a number.
SQRT( number)
MESSAGE "The square root of 256 is " SQRT(256) VIEW-AS ALERT-BOX. // Messages 16
MODULO - Determines the remainder after division.
expression MODULO base
DISPLAY 52 MODULO 12. //Displays 4
ROUND - Rounds a decimal expression to a specified number of places after the decimal point.
ROUND( number, precision)
DISPLAY ROUND(67.12345, 6) FORMAT "99.99999". // 67.12345
DISPLAY ROUND(67.12345, 5) FORMAT "99.99999". // 67.12345
DISPLAY ROUND(67.12345, 4) FORMAT "99.99999". // 67.12350
DISPLAY ROUND(67.12345, 3) FORMAT "99.99999". // 67.12300
DISPLAY ROUND(67.12345, 2) FORMAT "99.99999". // 67.12000
DISPLAY ROUND(67.12345, 1) FORMAT "99.99999". // 67.10000
DISPLAY ROUND(67.12345, 0) FORMAT "99.99999". // 67.00000
TRUNCATE Truncates a decimal expression to a specified number of decimal places, returning a decimal value.
TRUNCATE( number, places)
DISPLAY TRUNCATE(67.12345, 6) FORMAT "99.99999". // 67.12345
DISPLAY TRUNCATE(67.12345, 5) FORMAT "99.99999". // 67.12345
DISPLAY TRUNCATE(67.12345, 4) FORMAT "99.99999". // 67.12340
DISPLAY TRUNCATE(67.12345, 3) FORMAT "99.99999". // 67.12300
DISPLAY TRUNCATE(67.12345, 2) FORMAT "99.99999". // 67.12000
DISPLAY TRUNCATE(67.12345, 1) FORMAT "99.99999". // 67.10000
DISPLAY TRUNCATE(67.12345, 0) FORMAT "99.99999". // 67.00000
ABSOLUTE - Returns the absolute value of a number
DISPLAY ABS(10 - 12). //Displays 2
DISPLAY ABS(-2) = ABS(2). //Displays yes
MINIMUM and MAXIMUM - returns the smalles and largest number
MINIMUM(number1, number2, ... numbern)
MAXIMUM(number1, number2, ... numbern)
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DEFINE VARIABLE j AS INTEGER NO-UNDO.
DEFINE VARIABLE k AS INTEGER NO-UNDO.
i = 40.
j = 45.
k = 56.
DISPLAY MINIMUM(i, j, k) MAXIMUM(i, j, k). // Displays 40 and 56