]> git.ipfire.org Git - thirdparty/glibc.git/commit
Simplify powl computation for small integral y [BZ #33411]
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Sat, 11 Oct 2025 00:21:13 +0000 (20:21 -0400)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Tue, 21 Oct 2025 18:00:10 +0000 (14:00 -0400)
commit1b657c53c21a100082b0855392e4cb40c9c43a87
treeb545e4469fb352737e2bf71b82582ecfee44806c
parent87e850fb2683b3b1a8bceccc575a31d389f5ecd0
Simplify powl computation for small integral y [BZ #33411]

The powl implementation for x86_64 ends up multiplying X once more than
necessary and then throwing away that result.  This results in an
overflow flag being set in cases where there is no overflow.

Simplify the relevant portion by special casing the -3 to 3 range and
simply multiplying repetitively.

Resolves: BZ #33411
Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed by: Paul Zimmermann <Paul.Zimmermann@inria.fr>
math/auto-libm-test-in
math/auto-libm-test-out-pow
sysdeps/x86_64/fpu/e_powl.S