extern float normalizef (float x); extern double normalize (double x); extern long double normalizel (long double x); extern long_long_double normalizell (long_long_double x); extern __float80 normalizew (__float80 x); extern __float128 normalizeq (__float128 x); extern decimal_float normalizedf (decimal_float x); extern decimal_double normalized (decimal_double x); extern decimal_long_double normalizedl (decimal_long_double x); extern decimal_long_long_double normalizedll (decimal_long_long_double x);
NB: Functions with prototypes containing underscores in type names may be available only with certain extended compilers.
Decimal floating-point arithmetic has integer significands, so a number may have multiple representations of equal numerical value that differ in the number of trailing zeros and exponent.
For binary floating-point arithmetic on modern systems, numbers are always normalized, so return the argument unchanged.
normalized(+0.00100DD) -> +0.001DD normalized(+1.00DD) -> +1DD normalized(+100DD) -> +1E+2DD normalized(+100.00DD) -> +1E+2DD normalized(+NaN(0x1234)) -> +NaN(0x1234) normalized(+NaN(0x1234)) -> +NaN(0x1234) normalized(+Infinity) -> +Infinity normalized(-Infinity) -> -Infinity
The parenthesized hexadecimal values following some of the NaNs are payloads stored in the significand bits to identify the NaN that is returned.
The peculiar result for the second binary example arises because 100 = 1.5625 * 2**6.