mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-05 16:10:55 +00:00
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:
parent
8069c79ddd
commit
669152498a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=153078
|
@ -62,7 +62,7 @@ log1pf(float x)
|
||||||
if (hx >= 0x7f800000) return x+x;
|
if (hx >= 0x7f800000) return x+x;
|
||||||
if(k!=0) {
|
if(k!=0) {
|
||||||
if(hx<0x5a000000) {
|
if(hx<0x5a000000) {
|
||||||
u = (float)1.0+x;
|
*(volatile float *)&u = (float)1.0+x;
|
||||||
GET_FLOAT_WORD(hu,u);
|
GET_FLOAT_WORD(hu,u);
|
||||||
k = (hu>>23)-127;
|
k = (hu>>23)-127;
|
||||||
/* correction term */
|
/* correction term */
|
||||||
|
|
Loading…
Reference in a new issue