[Stlport-devel] num get float
Brought to you by:
complement
From: <fra...@fr...> - 2007-07-07 20:25:10
|
Hi I am working on the code used by STLport to read floating point numbers from stream. I have already fix some problems with long double and I have some more fixes to perform but before committing them I would like to get an answer to a question. Does anyone know why in _Stl_string_to_double function max_digits is defined as numeric_limits<double>::digits10 + 2 ? Why this additional 2 ? I have already detected that the 34 value used in _Stl_string_to_long_double is too much, when 34 digits are stored there is an overflow when computing value in _Stl_atod. I simply would like to know if we have to keep this arbitrary 2 and if so add a comment explaining why. Thanks |