[Bug 298260] [libm] fmaf() mishandled some subnormal input

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 10 Sep 2026 02:31:03 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=298260

--- Comment #5 from Steve Kargl <kargl@FreeBSD.org> ---
(In reply to Konstantin Belousov from comment #4)

musl patches and their implementation do not help.  I
literally copied musl's s_fmaf.c into my development
libm and updated my simple test.  The results are

% make clean && make test4 && ./test4
cc -c -O2 -mfma myfma.c
cc -Og -pipe -static -fno-builtin -I/usr/local/include -o test4 test4.c
-I/usr/local/include myfma.o -L/usr/local/lib -L../libm/msun -lmpfr -lgmp
-lmath

      libm           myfma
fmaf: 0x1.0002p-133, 0x1.0001p-133
fmaf: 0x1.d1179ep-29, 0x1.d1179ep-29
fmaf: 0x1p-149, 0x1p-149


myfma is a call to the x86_64 fma instruction.  The first line
is from your original testcase.  The next 2 lines are tests
from musl's commit messages.

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