[libc-commits] [PATCH] D114878: [libc] Fix a bug in MPFRUtils making ULP values off by 2^(-mantissaWidth).
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Dec 2 00:57:54 PST 2021
sivachandra accepted this revision.
sivachandra added a comment.
This revision is now accepted and ready to land.
Thanks for catching! My mistake.
================
Comment at: libc/utils/MPFRWrapper/MPFRUtils.cpp:315
int inputExponent = fputil::FPBits<T>(input).getExponent();
+ if (fputil::FPBits<T>(thisAsT).getUnbiasedExponent() == 0)
+ ++thisExponent;
----------------
Add a comment saying this is for the denormal adjustment.
================
Comment at: libc/utils/MPFRWrapper/MPFRUtils.cpp:339
int maxExponent = fputil::FPBits<T>(max).getExponent();
+ if (fputil::FPBits<T>(min).getUnbiasedExponent() == 0)
+ ++minExponent;
----------------
Same here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114878/new/
https://reviews.llvm.org/D114878
More information about the libc-commits
mailing list