Type short-float, single-float, double-float, long-float

Supertypes:

short-float: short-float, float, real, number, t

single-float: single-float, float, real, number, t

double-float: double-float, float, real, number, t

long-float: long-float, float, real, number, t

Description:

For the four defined subtypes of type float, it is true that 2.1.3 6intermediate between the type short-float and the type long-float are the type single-float and the type double-float. The precise definition of these categories is Changed from CLtL "\term{implementation-dependent}" by KMP per suggestion of Barmar. Every implementation has to implement all the float-xxx inspection functions anyway, so it's not really possible for an implementation to be wishy-washy on this issue.implementation-defined. The precision (measured in “bits”, computed as plog2b) and the exponent size (also measured in “bits,” computed as log2(n+1), where n is the maximum exponent value) is recommended to be at least as great as the values in the next figure. Each of the defined subtypes of type float might or might not have a minus zero.

FormatMinimum PrecisionMinimum Exponent Size
Short 13 bits 5 bits
Single 24 bits 8 bits
Double 50 bits 8 bits
Long 50 bits 8 bits

Figure 12–11. Recommended Minimum Floating-Point Precision and Exponent Size

2.1.3 10 2.1.3 11 2.1.3 18There can be fewer than four internal representations for floats. If there are fewer distinct representations, the following rules apply:

Compound Type Specifier Kind:

Abbreviating.

Compound Type Specifier Syntax:

4.6.0 8 4.6.0 9

short-float [short-lower-limit [short-upper-limit]]

single-float [single-lower-limit [single-upper-limit]]

double-float [double-lower-limit [double-upper-limit]]

long-float [long-lower-limit [long-upper-limit]]

Compound Type Specifier Arguments:

short-lower-limit, short-upper-limitinterval designators for type short-float. The defaults for each of lower-limit and upper-limit is the symbol *.

single-lower-limit, single-upper-limitinterval designators for type single-float. The defaults for each of lower-limit and upper-limit is the symbol *.

double-lower-limit, double-upper-limitinterval designators for type double-float. The defaults for each of lower-limit and upper-limit is the symbol *.

long-lower-limit, long-upper-limitinterval designators for type long-float. The defaults for each of lower-limit and upper-limit is the symbol *.

Compound Type Specifier Description:

Each of these denotes the set of floats of the indicated type that are on the interval specified by the interval designators.