As has been described earlier, math functions are called in the same manner as all other functions: a list whose first element is a math operator, and the rest of whose elements are arguments to that operator. The following math operators are defined:
(+ 2 3) 5(+ 1.5 2.35) 3.85
(- 5 2) 3(- 2.7 1.3) 1.4
(* )
Multiplication: returns .
(* 3 5) 15(* 1.5 2.5) 3.75
(/ 8 2) 4(/ 1.5 3) 0.5
(quotient )
Integer division: returns the integer portion of .
(quotient 9 4) 2(quotient 9 3) 3
(remainder )
Remainder: returns the remainder that results from the division of by
, or .
(remainder 9 4) 1(remainder 9 3) 0
(sqrt n)
Square root: returns .
(sqrt 4) 2(sqrt 2) 1.4142135623731
(expt )
Exponentiation: returns .
(expt 2 3) 8(expt 4 0.5) 2