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
which appears to assume that long double is an 80-bit float. This ignores the fact that the C standard does not make this guarantee, only that long double is at least as precise as a double. It is perfectly valid for long double to be 64-bit, and on nearly all non-Linux platforms this is the case.
Indeed on macOS formatting long double = 202 with generic_128 prints 1.6918505631274746047E-4932.
This is a massive silent gotcha.
The text was updated successfully, but these errors were encountered:
Using
generic_128
forlong double
yields incorrect outputs on most platforms. The API appears to want you to do this:However,
long_double_to_fd128
is implemented like this:which appears to assume that
long double
is an 80-bit float. This ignores the fact that the C standard does not make this guarantee, only thatlong double
is at least as precise as adouble
. It is perfectly valid forlong double
to be 64-bit, and on nearly all non-Linux platforms this is the case.Indeed on macOS formatting
long double = 202
withgeneric_128
prints1.6918505631274746047E-4932
.This is a massive silent gotcha.
The text was updated successfully, but these errors were encountered: