[libc-commits] [libc] [libc] Fix unused statements in asin when accurate path is not needed. (PR #150726)
via libc-commits
libc-commits at lists.llvm.org
Fri Jul 25 18:00:24 PDT 2025
https://github.com/lntue created https://github.com/llvm/llvm-project/pull/150726
Fix offload build bots: https://lab.llvm.org/buildbot/#/builders/10/builds/10213
>From 6e6ce337fde680def71810a71eab337deab05da5 Mon Sep 17 00:00:00 2001
From: Tue Ly <lntue.h at gmail.com>
Date: Sat, 26 Jul 2025 00:58:12 +0000
Subject: [PATCH] [libc] Fix unused statements in asin when accurate path is
not needed.
---
libc/src/__support/math/asin.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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