[llvm-branch-commits] [libclc] libclc: Update f64 log implementations (PR #186048)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Mar 11 23:58:54 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h -- libclc/clc/lib/generic/math/clc_log_base.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libclc/clc/lib/generic/math/clc_log_base.h b/libclc/clc/lib/generic/math/clc_log_base.h
index e7879c9dc..1d494f29c 100644
--- a/libclc/clc/lib/generic/math/clc_log_base.h
+++ b/libclc/clc/lib/generic/math/clc_log_base.h
@@ -195,10 +195,19 @@ __clc_log(double a)
double2 x = __clc_ep_div(m - 1.0, __clc_ep_fast_add(1.0, m));
double s = x.hi * x.hi;
- double p = __clc_mad(s, __clc_mad(s, __clc_mad(s,
- __clc_mad(s, __clc_mad(s, __clc_mad(s, 0x1.3ab76bf559e2bp-3, 0x1.385386b47b09ap-3),
- 0x1.7474dd7f4df2ep-3), 0x1.c71c016291751p-3),
- 0x1.249249b27acf1p-2), 0x1.99999998ef7b6p-2), 0x1.5555555555780p-1);
+ double p = __clc_mad(
+ s,
+ __clc_mad(s,
+ __clc_mad(s,
+ __clc_mad(s,
+ __clc_mad(s,
+ __clc_mad(s, 0x1.3ab76bf559e2bp-3,
+ 0x1.385386b47b09ap-3),
+ 0x1.7474dd7f4df2ep-3),
+ 0x1.c71c016291751p-3),
+ 0x1.249249b27acf1p-2),
+ 0x1.99999998ef7b6p-2),
+ 0x1.5555555555780p-1);
double2 r = __clc_ep_fast_add(__clc_ep_ldexp(x, 1), s * x.hi * p);
#if defined COMPILING_LOG2
``````````
</details>
https://github.com/llvm/llvm-project/pull/186048
More information about the llvm-branch-commits
mailing list