[libc-commits] [PATCH] D159476: [libc][math] Fix signed zeros for acosf, acoshf, and atanf in FE_DOWNWARD mode.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Sep 7 07:47:40 PDT 2023
sivachandra accepted this revision.
sivachandra added a comment.
This revision is now accepted and ready to land.
A nit marked inline.
================
Comment at: libc/src/math/generic/acosf.cpp:79
+ if (x_abs == 0x3f80'0000U)
+ return x_sign ? fputil::round_result_slightly_down(0x1.921fb6p+1f) : 0.0f;
+
----------------
You should add comments for each branch taken. For example:
```
if (x_abs == 0x3f80'0000U) { // |x| == 1
return x_sign ? /* x == -1 */ ... :
/* x == 1*/ ...;
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159476/new/
https://reviews.llvm.org/D159476
More information about the libc-commits
mailing list