Precise Lose Between Float64 and Uint64
In astjson library, the lexer scans the number and stores the respective bytes. Then the parser will parse the bytes to number which is expressed by a float64
. It works well at beginning, however, once I added a corner case of number with value math.MaxUint64
(1<<64 - 1
or decimal value 18446744073709551615
), the parser cannot work as expected. It's indeed a bug issue.
The simplified problem is the value through debug of f
is 18446744073709552000 instead of 18446744073709551615.