public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Suggest glibc patch
@ 2002-09-11 20:00 Brad Lucier
  2002-09-11 21:39 ` Andreas Jaeger
  0 siblings, 1 reply; 2+ messages in thread
From: Brad Lucier @ 2002-09-11 20:00 UTC (permalink / raw)
  To: drepper, jakub; +Cc: Brad Lucier, gcc

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.  */

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Suggest glibc patch
  2002-09-11 20:00 Suggest glibc patch Brad Lucier
@ 2002-09-11 21:39 ` Andreas Jaeger
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Jaeger @ 2002-09-11 21:39 UTC (permalink / raw)
  To: Brad Lucier; +Cc: gcc

Brad Lucier <lucier@math.purdue.edu> writes:

> glibc-hackers isn't open, so I thought I'd send this to you directly.

Either use the glibcbug script to report a bug and get it into gnats
or send it to libc-alpha,

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-12  4:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-11 20:00 Suggest glibc patch Brad Lucier
2002-09-11 21:39 ` Andreas Jaeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).