[libc-commits] [libc] [libc][math][c23] Add MPFR unit tests for {ceil, floor, round, roundeven, trunc}f16 (PR #94383)
via libc-commits
libc-commits at lists.llvm.org
Wed Jun 5 08:21:29 PDT 2024
================
@@ -529,8 +543,14 @@ class MPFRNumber {
// If the control reaches here, it means that this number and input are
// of the same sign but different exponent. In such a case, ULP error is
// calculated as sum of two parts.
- thisAsT = std::abs(thisAsT);
- input = std::abs(input);
+#ifdef LIBC_TYPES_HAS_FLOAT16
+ // TODO: This will no longer be needed once std::abs supports float16.
----------------
overmighty wrote:
Right. I could also use `.abs()` instead of `.set_sign(Sign::POS)` then.
https://github.com/llvm/llvm-project/pull/94383
More information about the libc-commits
mailing list