viggox / rapidjson

Automatically exported from code.google.com/p/rapidjson
MIT License
0 stars 0 forks source link

Cannot parse min normal positive double #117

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Try to parse 2.2250738585072014E−308, the min normal positive double, as 
described here: 
http://en.wikipedia.org/wiki/Double-precision_floating-point_format

What is the expected output? What do you see instead?
0.0

What version of the product are you using? On what operating system?
r131, Linux

Please provide any additional information below.
1.7976931348623157E308 seems to work, that's because in reader.h

d *= internal::Pow10(exp(308) + expFrac(-16)) 

With 2.2250738585072014E−308, we have

d *= internal::Pow10(exp(-308) + expFrac(-16)) < -308

Original issue reported on code.google.com by ppadev...@gmail.com on 14 Nov 2014 at 2:14