Namespaces
Variants
Views
Actions

std::numeric_limits<T>::max_digits10

From cppreference.com

Template:cpp/types/numeric limits/navbar

Template:dcl begin Template:dcl Template:dcl end

The value of Template:c is the number of base-10 digits that are necessary to uniquely represent all distinct values of the type Template:tt, such as necessary for serialization/deserialization to text. This constant is meaningful for all floating-point types.

Contents

[edit] Standard specializations

Template:dsc begin Template:dsc hitem Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc Template:dsc end

[edit] Notes

Unlike most mathematical operations, the conversion of a floating-point value to text and back is exact as long as at least Template:tt were used (Template:c for Template:c/core, Template:c for Template:c/core): it is guaranteed to produce the same floating-point value, even though the intermediate text representation is not exact. It may take over a hundred decimal digits to represent the precise value of a Template:c/core in decimal notation.

[edit] Example

Template:example

[edit] See also

Template:dsc begin Template:dsc inc Template:dsc inc Template:dsc inc Template:dsc inc Template:dsc inc Template:dsc end

Template:langlinks