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
See also truncate-quotient
, truncate-remainder
and
related operations in Arithmetic Functions.
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
See also floor-quotient
, floor-remainder
and
related operations in Arithmetic Functions.
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.
Return the least common multiple of the arguments. If called without arguments, 1 is returned.
The C function scm_lcm
always takes two arguments, while the
Scheme function can take an arbitrary number.