1.(number? v) → boolean?
Returns #t if v is a number, #f otherwise.
(number? 1)
#t
(number? 2+3i)
#t
(number? "hello")
#f
(number? +nan.0)
#t
-
2.(positive? x) → boolean?
x : real?
Returns (> x 0).
(positive? 10)
#t
(positive? -10)
#f
(positive? 0.0)
#f
-
3.(negative? x) → boolean?
x : real?
Returns (< x 0).
(negative? 10)
#f
(negative? -10)
#t
(negative? -0.0)
#f
-
4.(add1 z) → number?
z : number?
Returns (+ z 1).
-
5.(sub1 z) → number?
z : number?
Returns (- z 1).
-
6.(abs x) → number?
x : real?
Returns the absolute value of x.
Examples:
-
7.(max x0 x1 x2 ...) → real?
x : real?
Returns the largest of the x0 ... xn
(max 1 3)
3
(max 1 3 2)
3
(max 1 3 2.0)
3.0
(max 1 3 2 0.5)
3
-
8.(min x0 x1 x2 ...) → real?
x : real?
Returns the smallest of the x0 ... xn
(min 1 3 )
1
(min 1 3 2)
1
(min 1 3 2.0)
1.0
(min 1 3 2.0 4)
1.0