Number Formats

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 use e or E. Use - and + for signed representation of the floating number or the exponent.

The following table lists the suffixes that are supported.

Table 1. Supported Number Suffixes
Constant Suffix Type
floating F float
floating L long double
integral U unsigned in t
integral uL unsigned long

Suffixes are not case-sensitive, for example, ul, Ul, uL and UL all denote an unsigned long type. The following listing shows examples of these numerical formats.

Listing: Examples of Supported Number Suffixes


   +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 */