]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix a double-rounding bug in fma{,f,l}. The bug would occur in
authordas <das@FreeBSD.org>
Sat, 15 Oct 2011 04:16:58 +0000 (04:16 +0000)
committerdas <das@FreeBSD.org>
Sat, 15 Oct 2011 04:16:58 +0000 (04:16 +0000)
commit7c947eee2570f5cda7e1ce3562be6f001928ebb0
tree36d6efaa318c8cce599f8866053ea431abd3c480
parent4daad241b3b6198dbc15d5c7c4bb1ce0542c9677
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