Long double

C++ long double is guaranteed to be the largest built-in floating point data type. It has been introduced in C++11 standard and was intended to allow platforms to have a new, more precise data format, taking advantage of advances in computer architecture. It is, however, not a requirement that long double is more precise than double, just that it cannot be less precise.

It is not possible to enumerate long double values just like any other floating point format.

Literals
Numeric literals that are followed by by l or L are long double. For example:,  ,  , or.

long double can store positive infinity, negative infinity, and NaN (not a number). NaN is generated when the result is mathematically ambiguous or impossible to determine, for example 0÷0.

Characteristics
The library consists of the following constants describing the behaviour of float
 * FLT_RADIX &mdash; base of the floating point numbers.
 * LDBL_MANT_DIG &mdash; number of mantissa digits.
 * LDBL_DIG &mdash; number of significant digits that can be stored.
 * LDBL_MIN_EXP &mdash; minimum negative exponent.
 * LDBL_MAX_EXP &mdash; maximum positive exponent.
 * LDBL_MIN_10_EXP &mdash; minimum base-10 negative exponent that can be transformed into a valid long double
 * LDBL_MAX_10_EXP &mdash; maximum base-10 positive exponent that can be transformed into a valid long double
 * LDBL_EPSILON &mdash; the difference from 1.0 to the smallest possible value that is greater than 1.0
 * LDBL_MIN &mdash; the smallest possible value that is greater than 0.0

Other C++ data types storing floating point numbers

 * float least precise floating point data type
 * double not less precise than float