Next: Comparison, Previous: Number Syntax, Up: Numbers
Return
#t
if n is an odd number,#f
otherwise.
Return
#t
if n is an even number,#f
otherwise.
Return the quotient or remainder from n divided by d. The quotient is rounded towards zero, and the remainder will have the same sign as n. In all cases quotient and remainder satisfy n = q*d + r.
(remainder 13 4) => 1 (remainder -13 4) => -1
Return the remainder from n divided by d, with the same sign as d.
(modulo 13 4) => 1 (modulo -13 4) => 3 (modulo 13 -4) => -3 (modulo -13 -4) => -1
Return the greatest common divisor of all arguments. If called without arguments, 0 is returned.
The C function
scm_gcd
always takes two arguments, while the Scheme function can take an arbitrary number.