[libc-commits] [PATCH] D101134: [libc] Add implementation of expm1f.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Sun Apr 25 22:26:05 PDT 2021


sivachandra added a comment.

LGTM but I have added a comment to add a sollya script. Good to go after that.



================
Comment at: libc/src/math/generic/expm1f.cpp:28
+    if (abs_x < 0.25f) {
+      // From Sollya command:
+      // > fpminimax(f, [|1, ..., 6|], [|1, 24...|], [-1/4, 1/4], relative);
----------------
I think we should add a sollya script for this under a directory named `utils/mathtools` so that future tuning can have a starting point to play with. And then, instead of inline comments like this, you can point to that sollya script at the top of this function.


================
Comment at: libc/test/src/math/expm1f_test.cpp:31
+
+TEST(LlvmLibcexpm1fTest, SpecialNumbers) {
+  errno = 0;
----------------
Nitty nit: The name should probably be `LlvmLibcExpm1fTest` (ie. with the `Exmpm1` capitalized.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101134



More information about the libc-commits mailing list