This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Suggest glibc patch
- From: Brad Lucier <lucier at math dot purdue dot edu>
- To: drepper at redhat dot com, jakub at redhat dot com
- Cc: lucier at math dot purdue dot edu (Brad Lucier), gcc at gcc dot gnu dot org
- Date: Wed, 11 Sep 2002 22:00:41 -0500 (EST)
- Subject: Suggest glibc patch
glibc-hackers isn't open, so I thought I'd send this to you directly.
The inlined versions of acosh and atanh are significantly less accurate
than the library version on i386 (the former for arguments near one,
the latter for arguments near zero). See
http://www.math.purdue.edu/~lucier/fun-test/linux-O0/summary.html
and
http://www.math.purdue.edu/~lucier/fun-test/linux-O1/summary.html
for test results and recent discussion in the gcc mail list.
It is also clear (and also commented) that the inlined version of
asinh and hypot have reduced argument ranges.
So I suggest that these functions be inlined only when __FAST_MATH__
is defined, with the following patch.
* mathinline.h: Inline log1p, asinh, acosh, atanh, hypot, and logb
only when __FAST_MATH__ is defined.
===================================================================
RCS file: RCS/mathinline.h,v
retrieving revision 1.1
diff -u -r1.1 mathinline.h
--- mathinline.h 2002/09/12 01:39:15 1.1
+++ mathinline.h 2002/09/12 02:47:56
@@ -526,11 +526,9 @@
/* Optimized versions for some non-standardized functions. */
-#if defined __USE_ISOC99 || defined __USE_MISC
+#if (defined __USE_ISOC99 || defined __USE_MISC) && defined __FAST_MATH__
-# ifdef __FAST_MATH__
__inline_mathcodeNP (expm1, __x, __expm1_code)
-# endif
/* We cannot rely on M_SQRT being defined. So we do it for ourself
here. */