A number in MzScheme is one of the following:
The following are inexact numerical constants: +inf.0
(infinity), -inf.0 (negative infinity), +nan.0
(not a number), and -nan.0 (same as +nan.0). They
have no exact form. Dividing by an inexact zero returns
+inf.0 or -inf.0, depending on the sign of the
dividend. The infinities are integers, and they answer #t for
both even? and odd?; +nan.0 is not an
integer and is not = to itself, but +nan.0 is
eqv? to itself. Similarly, (= 0.0 -0.0)
is #t, but (eqv? 0.0 -0.0) is #f.
All multi-argument arithmetic procedures operate pairwise on arguments from right to left.
The string->number procedure works on all number representations and exact integer radix values in the range 2 to 16 (inclusive). The number->string procedure accepts all number types and the radix values 2, 8, 10, and 16; however, if an inexact number is provided with a radix other than 10, the exn:application:mismatch exception is raised.
The add1 and sub1 procedures work on any number:
The following procedures work on exact integers in their (semi-infinite) two's complement representation:
The random procedure generates pseudo-random integers: