]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix a double-rounding bug in fma{,f,l}. The bug would occur in
authorDavid Schultz <das@FreeBSD.org>
Sat, 15 Oct 2011 04:16:58 +0000 (04:16 +0000)
committerDavid Schultz <das@FreeBSD.org>
Sat, 15 Oct 2011 04:16:58 +0000 (04:16 +0000)
commitec95083025258f55f62e8c20b816d514a8deda42
tree36d6efaa318c8cce599f8866053ea431abd3c480
parent2a2e6f0aeb015c902e55e0535a92565f38123127
Fix a double-rounding bug in fma{,f,l}.  The bug would occur in
round-to-nearest mode when the result, rounded to twice machine
precision, was exactly halfway between two machine-precision
values.  The essence of the fix is to simulate a "sticky bit" in
the pathological cases, which is how hardware implementations
break the ties.

MFC after: 1 month
lib/msun/src/s_fma.c
lib/msun/src/s_fmaf.c
lib/msun/src/s_fmal.c