Closed jimihem closed 3 months ago
PR 3388 has fixed some cases about float overflow. This PR fix a new case. The max positive interger that 32bit int can represent is 2147483647, in this case it's 2147483649.
Won't your "fix" still break if the exponent is larger than can be represented in 64 bits? It's also not necessary, any exponent with an absolute value above 310 is too big to fit in a double anyway. So IMO it would make more sense to just check the exponent and clamp it to some arbitrary "too big" value which will be handled correctly by the rest of the code.
I'm going to do my own version of this PR, #3562 but I'll keep the part of the commit that adds the test (with you as the author), thanks for the test.
"2147483649" of 1.0e2147483649 is out of range that positive 32bits int can store.