(number?
val
)
val
is a number.
(integer?
val
)
val
is an integer.
(rational?
val
)
val
can be interpreted
as a rational number.
(real?
val
)
val
is a real number.
(complex?
val
)
val
can be interpreted
as a complex number.
(max
v_{1}
v_{2}
)
v_{1}
and
v_{2}
.
(max
v_{1}
v_{2}
...
v_{n}
)
v_{1}
through v_{n}
.
(min
v_{1}
v_{2}
)
v_{1}
and
v_{2}
.
(min
v_{1}
v_{2}
...
v_{n}
)
v_{1}
through v_{n}
.
(quotient
dividend
divisor
)
dividend
and
divisor
, both of which must be integers.
The quotient is the whole part of the result of dividing
dividend
by divisor
.
(remainder
dividend
divisor
)
dividend
by divisor
.
(modulo
value
modulus
)
modulus
-sized sections, gives the
offset of value
from the start of its
section.
(floor
num
)
num
. That is, round down.
(ceiling
num
)
num
. That is, round up.
(truncate
num
)
num
.
That is, round toward zero.
(round
num
)
num
toward the nearest integer.
If the decimal portion of num
is greater
than 1/2, rounds up. If the decimal portion is less than
1/2, rounds down. If the decimal portion equals 1/2, may
round in either direction. (In most implementations,
numbers with fractional portions equal to 1/2 round toward
the even number.)
(exact?
num
)
num
is
represented exactly (that is, not approximated).
(inexact?
num
)
num
is
represented inexactly (that is, approximated).
(even?
int
)
int
is
even (that is, has a remainder of 0 when divided by 2).
(odd?
int
)
int
is
odd (that is, has a remainder of 1 when divided by 2).
(zero?
num
)
num
is
zero.
(positive?
num
)
num
is
positive (greater than zero).
(negative?
num
)
num
is
negative (less than zero).
(exact->inexact
num
)
num
.
(inexact->exact
num
)
num
.
(Of course, if num
was already
approximated, the result, while exact, still approximates
whatever num
approximated.)
(abs
num
)
num
.
(expt
base
power
)
base
^{power}.
Copyright © 2007-2012 Janet Davis, Matthew Kluber, Samuel A. Rebelsky, and Jerod Weinman. (Selected materials copyright by John David Stone and Henry Walker and used by permission.)
This material is based upon work partially supported by the National Science Foundation under Grant No. CCLI-0633090. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
This work is licensed under a Creative Commons Attribution-NonCommercial 2.5 License .