bnclabs / gson

Algorithms on data formats - JSON, CBOR, Collation.
http://prataprc.github.io/jsonsort.io
MIT License
19 stars 8 forks source link

Bugfix, collating large numbers, greater than 2^53, skips -1 precision. #25

Closed prataprc closed 6 years ago

prataprc commented 6 years ago

While collating large uint64 and int64 that are outside the bounds of floating point precision for integers, we are self composing a e-notation for such numbers. While doing so, we are supposed to use -1 precision https://golang.org/pkg/strconv/#FormatFloat.

Solution: Use math/big in such cases.