[libc-commits] [PATCH] D127046: [libc][math] fmod/fmodf implementation.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jun 23 19:43:23 PDT 2022


lntue added inline comments.


================
Comment at: libc/src/__support/FPUtil/generic/FMod.h:138
+    if (n > hyltzeroes) {
+      intU_t inv_hy = (std::numeric_limits<intU_t>::max() / hy);
+      while (n > hyltzeroes) {
----------------
Use `NumericLimits` template from `libc/src/__support/CPP/Limits.h`.


================
Comment at: libc/test/src/math/FModTest.h:36
+  void testSpecialNumbers(FModFunc f) {
+    using nl = std::numeric_limits<T>;
+
----------------
Use `NumericLimits` template from `libc/src/__support/CPP/Limits.h`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127046/new/

https://reviews.llvm.org/D127046



More information about the libc-commits mailing list