XL C/C++ supports
the following
binary floating-point formats:
- 32-bit single precision, with an approximate absolute normalized range
of 0 and 10-38 to 10+38 and precision of about 7 decimal
digits
- 64-bit double precision, with an approximate absolute normalized range
of 0 and 10-308 to 10+308 and precision of about 16
decimal digits
- 128-bit extended precision, with slightly greater range than double-precision
values, and with a precision of about 32 decimal digits
Note that the long double type may
represent either double-precision or extended-precision values, depending
on the setting of the -qldbl128 compiler option. The default
is 128 bits. For compatibility with older compilations, you can use -qnoldbl128 if
you need long double to be 64 bits.
Beginning in V9.0, on selected hardware and operating
system levels, the compiler also supports the following decimal floating-point
formats:
- 32-bit single precision, with an approximate range of 10-101 to
10+90 and precision of 7 decimal digits
- 64-bit double precision, with an approximate range of 10-398 to
10+369 and precision of 16 decimal digits
- 128-bit extended precision, with an approximate range of 10-6176 to
10+6111, and with a precision of 34 decimal digits