[libc-commits] [libc] [libc][math] Integer-only, statically rounded implementation of expf (PR #209406)
Hoàng Minh Thiên via libc-commits
libc-commits at lists.llvm.org
Mon Aug 17 20:20:23 PDT 2026
================
@@ -8,9 +8,18 @@
#include "src/math/expf.h"
#include "src/__support/math/expf.h"
+#include "src/__support/math/expf_integer_eval.h"
namespace LIBC_NAMESPACE_DECL {
-LLVM_LIBC_FUNCTION(float, expf, (float x)) { return math::expf(x); }
+LLVM_LIBC_FUNCTION(float, expf, (float x)) {
+#if defined(LIBC_MATH_HAS_SKIP_ACCURATE_PASS) && \
+ defined(LIBC_MATH_SMALL_TABLES) && \
+ !defined(LIBC_TARGET_CPU_HAS_FPU_DOUBLE)
+ return math::integer_only::expf(x);
----------------
hmthien050209 wrote:
Updated to add static-rounding-specific tests alongside this new implementation.
https://github.com/llvm/llvm-project/pull/209406
More information about the libc-commits
mailing list