[libc-commits] [PATCH] D84725: [libc] Add ULP function to MPFRNumber class to test correctly rounded functions such as SQRT, FMA.
Tue Ly via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Aug 13 08:09:07 PDT 2020
lntue marked an inline comment as done.
lntue added inline comments.
Comment at: libc/utils/MPFRWrapper/MPFRUtils.cpp:230
+ " MPFR rounded: ", toFloatingPoint<T>(mpfrResult), OS);
+ OS << '\n';
> In what circumstances would a rounded MPFR result help understand a test failure?
When the ULP error is exactly 0.5, the ULP value itself is not enough to check if the rounding is correct. This should never happen with SQRT function, but other one like HYPOT or FMA might be able to hit exactly 0.5 ULP.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libc-commits