gcc: Hex Floats

1 
1 6.14 Hex Floats
1 ===============
1 
1 ISO C99 supports floating-point numbers written not only in the usual
1 decimal notation, such as '1.55e1', but also numbers such as '0x1.fp3'
1 written in hexadecimal format.  As a GNU extension, GCC supports this in
1 C90 mode (except in some cases when strictly conforming) and in C++.  In
1 that format the '0x' hex introducer and the 'p' or 'P' exponent field
1 are mandatory.  The exponent is a decimal number that indicates the
1 power of 2 by which the significant part is multiplied.  Thus '0x1.f' is
1 1 15/16, 'p3' multiplies it by 8, and the value of '0x1.fp3' is the same
1 as '1.55e1'.
1 
1  Unlike for floating-point numbers in the decimal notation the exponent
1 is always required in the hexadecimal notation.  Otherwise the compiler
1 would not be able to resolve the ambiguity of, e.g., '0x1.f'.  This
1 could mean '1.0f' or '1.9375' since 'f' is also the extension for
1 floating-point constants of type 'float'.
1