[Bug 284905] __builtin_powf produces incorrect result on FreeBSD

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 19 Feb 2025 20:01:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284905

sgk@troutmask.apl.washington.edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sgk@troutmask.apl.washingto
                   |                            |n.edu

--- Comment #2 from sgk@troutmask.apl.washington.edu ---
It's unclear what the test is trying to demonstrate.  Of course, I have zero
knowledge about C++.   My simply testing with a binary32_t type shows

% pwd
/mnt3/kargl/trunk/math/powl
%  make testf
cc -o testf -O2 -pipe -static -Wall -fno-builtin -I/mnt3/kargl/include
-I/usr/local/include -I../mp -I/mnt3/kargl/trunk/math/libm/msun/src testf.c
-L/mnt3/kargl/lib -L/usr/local/lib -L../mp -L/mnt3/kargl/trunk/math/libm/msun
-lmpsk -lmpfr -lgmp -lm
%  ./testf -a 10. 11.
libm =  1.00000006e+11f, /* 0x51ba43b8 */
mpfr =  9.99999980e+10f, /* 0x51ba43b7 */
 ulp = 0.75000

It seems other libm's may use a different algorithm than FreeBSD, but
trying to get better that ulp=0.75 for one testcase may not be a prudent
use of one's time.

-- 
You are receiving this mail because:
You are the assignee for the bug.