Use the usual volatile hack to trick gcc into clipping any extra precision

on assignment.

Extra precision on i386's broke hi+lo decomposition in the usual way.
It caused all except 1 of the 62343 errors of more than 1 ulp for
log1pf() on i386's with gcc -O [-fno-float-store].
This commit is contained in:
Bruce Evans 2005-12-04 08:57:54 +00:00
parent 8069c79ddd
commit 669152498a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153078

View file

@ -62,7 +62,7 @@ log1pf(float x)
if (hx >= 0x7f800000) return x+x;
if(k!=0) {
if(hx<0x5a000000) {
u = (float)1.0+x;
*(volatile float *)&u = (float)1.0+x;
GET_FLOAT_WORD(hu,u);
k = (hu>>23)-127;
/* correction term */