summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2005-12-04 08:57:54 +0000
committerbde <bde@FreeBSD.org>2005-12-04 08:57:54 +0000
commit6d4e9a9d976946a641cf064d6fd8c49fe64be78b (patch)
tree1e19f80e5d313d2e49d2ffe3f0b1f5e4ebef145b /lib
parentcfd645d0ab937207a49f85fe3d758be5b1686cfc (diff)
downloadFreeBSD-src-6d4e9a9d976946a641cf064d6fd8c49fe64be78b.zip
FreeBSD-src-6d4e9a9d976946a641cf064d6fd8c49fe64be78b.tar.gz
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].
Diffstat (limited to 'lib')
-rw-r--r--lib/msun/src/s_log1pf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/msun/src/s_log1pf.c b/lib/msun/src/s_log1pf.c
index c2f01c7..76fb33c 100644
--- a/lib/msun/src/s_log1pf.c
+++ b/lib/msun/src/s_log1pf.c
@@ -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 */
OpenPOWER on IntegriCloud