You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When casting a long double that overflows the double-precision floating point exponent range (10^308) to double and trying to print it, it results in an infinite print loop:
Looking at the binary representation, it seems the casting is going very wrong:
With an exponent smaller than 308 this doesn't happen, however the lack of precision is extremely high, which might be a bug on its own:
For comparison, with glibc, casting a long double to overflowing double results in "inf" and the precision is much higher:
Maybe we should go with the glibc approach and print "inf" in these cases?
The text was updated successfully, but these errors were encountered:
When casting a long double that overflows the double-precision floating point exponent range (10^308) to double and trying to print it, it results in an infinite print loop:
Looking at the binary representation, it seems the casting is going very wrong:
With an exponent smaller than 308 this doesn't happen, however the lack of precision is extremely high, which might be a bug on its own:
For comparison, with glibc, casting a long double to overflowing double results in "inf" and the precision is much higher:
Maybe we should go with the glibc approach and print "inf" in these cases?
The text was updated successfully, but these errors were encountered: