Closed komi1230 closed 2 years ago
Hi Komi. Sorry for this late answer, i was in PTO. I don't think this PR completely corrects the problem. What happens with an integer near i64: MAX? It would be better to try parsing the number as i64 and if that fails try parsing it as f64, then convert it to i64. Thus big integers do not lose in precision.
Definitely! I tried to parse big integer as f64 but something goes wrong. I'll fix as you pointed out. Thanks !
Hi ! I encountered an error in parsing big integer.
For example,
123.45E4
is integer and this should be parsed as1234500
but this fails. Rust cannot parse123.45E4
as integer but can parse as float.So with this change, we at first accept data as float and then cast it as integer.