1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
S9fES (exponent number) ==> integer
(mantissa number) ==> integer
EXPONENT returns the exponent of a real number and MANTISSA
returns its mantissa:
real = (* mantissa (expt 10 exponent))
S9fES stores real numbers in such a format that the mantissa
is always in integer and no trailing (yet significant) zeros
are kept in the mantissa, e.g. 1000.0 would have a mantissa
of 1 and an exponent of 3. This differs from the external
form of real numbers, where the exponent is scaled to make
numbers more friendly to human perception.
Integers have an exponent of zero and a mantissa that is
equal to their value.
(exponent 12300.0) ==> 2
(mantissa 12300.0) ==> 123
(exponent 123.456) ==> -3
(mantissa 123.456) ==> 123456
(exponent 123) ==> 0
(mantissa 123) ==> 123
|