Valid constant floating number suffixes are f and F for float and l or L for long double. Note that floating constants without suffixes are double constants in ANSI. For exponential numbers e or E has to be used. - and + can be used for signed representation of the floating number or the exponent.
The following suffixes are supported:
| Constant | Suffix | Type |
|---|---|---|
| floating | F | float |
| floating | L | long double |
| integral | U | unsigned in t |
| integral | uL | unsigned long |
Suffixes are not case-sensitive, e.g., ul, Ul, uL and UL all denote an unsigned long type. The following listing has examples of these numerical formats.
+3.15f /* float */ -0.125f /* float */ 3.125f /* float */ 0.787F /* float */ 7.125 /* double */ 3.E7 /* double */ 8.E+7 /* double */ 9.E-7 /* double */ 3.2l /* long double */ 3.2e12L /* long double */