[libc-commits] [libc] 37ccb45 - [libc] Fix unused statements in asin when accurate path is not needed. (#150726)
via libc-commits
libc-commits at lists.llvm.org
Fri Jul 25 18:38:41 PDT 2025
Author: lntue
Date: 2025-07-25T21:38:38-04:00
New Revision: 37ccb45ba75ca5dd56a23b71dc22afc2e46b75ba
URL: https://github.com/llvm/llvm-project/commit/37ccb45ba75ca5dd56a23b71dc22afc2e46b75ba
DIFF: https://github.com/llvm/llvm-project/commit/37ccb45ba75ca5dd56a23b71dc22afc2e46b75ba.diff
LOG: [libc] Fix unused statements in asin when accurate path is not needed. (#150726)
Fix offload build bots:
https://lab.llvm.org/buildbot/#/builders/10/builds/10213
Added:
Modified:
libc/src/__support/math/asin.h
Removed:
################################################################################
diff --git a/libc/src/__support/math/asin.h b/libc/src/__support/math/asin.h
index 9734f349688c0..84fc1cfd5679e 100644
--- a/libc/src/__support/math/asin.h
+++ b/libc/src/__support/math/asin.h
@@ -27,8 +27,6 @@ namespace math {
static constexpr double asin(double x) {
using namespace asin_internal;
- using Float128 = fputil::DyadicFloat<128>;
- using DoubleDouble = fputil::DoubleDouble;
using FPBits = fputil::FPBits<double>;
FPBits xbits(x);
@@ -76,6 +74,9 @@ static constexpr double asin(double x) {
#ifdef LIBC_MATH_HAS_SKIP_ACCURATE_PASS
return x * asin_eval(x * x);
#else
+ using Float128 = fputil::DyadicFloat<128>;
+ using DoubleDouble = fputil::DoubleDouble;
+
unsigned idx = 0;
DoubleDouble x_sq = fputil::exact_mult(x, x);
double err = xbits.abs().get_val() * 0x1.0p-51;
More information about the libc-commits
mailing list