4 Jun
2012
4 Jun
'12
8:29 a.m.
Why the max_digits10 are not respectively 50,100 and 1?
numeric_limits<>::digits10 are those values.
The single think in the documentation that could let think the number of digits to be greater than the parameter is the *should* word in the sentence "The class takes a single template parameter - |Digits10| - which is the number of decimal digits precision the type *should* support." Could the documentation be more precise?
Is there a way to request for exactly N decimal digits to minimize the sizeof?
No, Chris has added a number of guard digits to the implementation of cpp_dec_float and there's no way to force it not to use these. Chris can better explain why they're needed. That's also why max_digits10 > digits10. John.