ctelroy / rapidjson

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

can't parse small floating point values with rapidjson #75

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create a json msg containing value with a small floating point value 
-2.2250738585072e-308
2. attempt to parse the test json msg
3.

What is the expected output? What do you see instead?
parsed value should be same as input json floating point value - 
-2.250738585072e-308

What version of the product are you using? On what operating system?
ver 0.11 on RedHat 6.4 (Santiago)

Please provide any additional information below.

Original issue reported on code.google.com by dlbattle...@gmail.com on 22 May 2013 at 4:53

GoogleCodeExporter commented 8 years ago
workaround - replace reader.h line 632 with:
    if (exp < 0){
       d* = internal::Pow10(exp);
       d* = internal::Pow10(expFrac); 
    } else { 
       d* = internal::Pow10(exp + expFrac); 
    }

Original comment by dlbattle...@gmail.com on 23 May 2013 at 12:38

GoogleCodeExporter commented 8 years ago

Original comment by milo...@gmail.com on 18 Jun 2013 at 1:46

GoogleCodeExporter commented 8 years ago
Is there a rationale on fixing the fast look table for Pow10 double array to 
-308 to 308?

Original comment by dheep.ch...@gmail.com on 15 Jan 2014 at 8:20

GoogleCodeExporter commented 8 years ago
https://github.com/miloyip/rapidjson/pull/34

Original comment by milo...@gmail.com on 30 Jun 2014 at 1:39