hrobeers / finFoil

The main finFoil repo
http://www.finfoil.io
Other
25 stars 5 forks source link

Reduce floating point serialization precision #49

Closed hrobeers closed 8 years ago

hrobeers commented 8 years ago

The json floating point precision is higher than finFoil's precision.

["C",32.190983899999999,-63.065339999999999,140.79888589999999,-227.155744,269.50071800000001,-228.968964]

hrobeers commented 8 years ago

Regex to match 6+ 0's or 9's followed by another digit: std::regex re("([0]{6,}|[9]{6,})\d");

hrobeers commented 8 years ago

Demo gist: https://gist.github.com/hrobeers/21a580da01b8110b1bb1

hrobeers commented 8 years ago

implemented: 254e45ed36cefb758212abe1b486d8992a68639f