LDBL_EPSILON value

There has been some discussion surrounding clang’s value of LDBL_EPSILON (e.g. see Bugzilla 48341).

clang and GCC both use a “best-case” value of 2^-1074 for epsilon whereas IBM’s clang-based compiler opts to use the more conservative value of 2^-105. I would like to reopen a discussion about possibly redefining clang’s epsilon value.

  • TA

There has been some discussion surrounding clang's value of LDBL_EPSILON
(e.g. see Bugzilla 48341).

It would help if you mentioned that this is a GCC bug number, not a
LLVM bug number.

clang and GCC both use a "best-case" value of 2^-1074 for epsilon whereas
IBM's clang-based compiler opts to use the more conservative value of
2^-105. I would like to reopen a discussion about possibly redefining
clang's epsilon value.

I don't see anything wrong with Joseph's reasoning. Double-Double is
obnoxious and irregular in a number of important ways and this just
seems to be one of them.

Joerg

There has been some discussion surrounding clang’s value of LDBL_EPSILON (e.g. see Bugzilla 48341).

clang and GCC both use a “best-case” value of 2^-1074 for epsilon whereas IBM’s clang-based compiler opts to use the more conservative value of 2^-105. I would like to reopen a discussion about possibly redefining clang’s epsilon value.

FWIW, on at least powerpc64le, newer GCC seems to define long double as double by default. I found a page here: https://gcc.gnu.org/wiki/Ieee128PowerPC