floatfloat, real, number, t
A float is a mathematical rational (but not a Common Lisp rational) of the form , where is or , the sign; is an integer greater than 1, the base or radix of the representation; is a positive integer, the precision (in base- digits) of the float; is a positive integer between and (inclusive), the significand; and is an integer, the exponent. The value of and the range of depends on the implementation and on the type of float within that implementation. In addition, there is a floating-point zero; depending on the implementation, there can also be a “minus zero”. If there is no minus zero, then and are both interpreted as simply a floating-point zero. (= 0.0 -0.0) is always true. If there is a minus zero, (eql -0.0 0.0) is false, otherwise it is true.
!!!Reviewer: Barmar: What about IEEE NaNs and infinities?
!!!Reviewer: RWK: In the following, what is the “ordering”? precision? range? Can there be additional subtypes of float or does “others” in the list of four?
2.15.0 12The types short-float, single-float, double-float, and long-float are subtypes of type float. Any two of them must be either disjoint types or the same type; if the same type, then any other types between them in the above ordering must also be the same type. For example, if the type single-float and the type long-float are the same type, then the type double-float must be the same type also.
Abbreviating.
float [lower-limit [upper-limit]]
lower-limit, upper-limit—interval designators for type float. The defaults for each of lower-limit and upper-limit is the symbol *.
This denotes the floats on the interval described by lower-limit and upper-limit.
Figure 2–9, Section 2.3.2 (Constructing Numbers from Tokens), Section 22.1.3.1.3 (Printing Floats)
Note that all mathematical integers are representable not only as Common Lisp reals, but also as complex floats. For example, possible representations of the mathematical number include the integer 1, the float 1.0, or the complex #C(1.0 0.0).