[libc-commits] [PATCH] D115347: [libc] Optimize PolyEval for x86-64 with degree 3-6 polynomials.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Dec 9 13:37:49 PST 2021


sivachandra added a comment.

Is the subject line and description correct?



================
Comment at: libc/src/__support/FPUtil/PolyEval.h:40
+
+#include "x86_64/PolyEvalDouble.h"
+#include "x86_64/PolyEvalFloat.h"
----------------
Can these be in just one file say, `PolyEvalSpecializations.h`?


================
Comment at: libc/test/src/math/expm1f_test.cpp:111
       continue;
-    ASSERT_MPFR_MATCH(mpfr::Operation::Expm1, x, __llvm_libc::expm1f(x), 1.5);
+    ASSERT_MPFR_MATCH(mpfr::Operation::Expm1, x, __llvm_libc::expm1f(x), 2.2);
   }
----------------
lntue wrote:
> sivachandra wrote:
> > If there is a possibility of trading off between performance and accuracy, we should provide build time switches for users to pick one or the other based on their needs. By default we want to "err" on the side of providing more accurate implementations over providing faster but less accurate implementations.
> We're going to have a correctly rounded version for expm1f soon so I'm not worried about this regression yet.
Do we know why the accuracy dropped? If yes, can we add the reason to the commit description?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115347



More information about the libc-commits mailing list