public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Update ulps on i386/s390{,x} for GCC 3.4
@ 2004-06-11 13:45 Jakub Jelinek
  2004-06-11 16:16 ` Martin Schwidefsky
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2004-06-11 13:45 UTC (permalink / raw)
  To: Ulrich Drepper, Roland McGrath; +Cc: Glibc hackers

Hi!

With GCC 3.4, some routines lost slightly precision (while others improved,
but ulps should satisfy GCC 3.{2,3,4} at least).
There are two more problems with GCC 3.4 and glibc, on i386 inl-tester
failed (likely a miscompilation) and GCC 3.4 compiled libm on s390/s390x
fails a bunch of tests for exceptions being raised/not-raised on NaN/Inf
arguments in test-double (e.g. sqrt (NaN)).
Will look into that next.

2004-06-11  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/i386/fpu/libm-test-ulps: Update fro GCC 3.4.
	* sysdeps/s390/fpu/libm-test-ulps: Likewise.

--- libc/sysdeps/i386/fpu/libm-test-ulps.jj	2003-03-22 07:14:23.000000000 +0100
+++ libc/sysdeps/i386/fpu/libm-test-ulps	2004-06-11 14:59:30.754249000 +0200
@@ -609,9 +609,9 @@ ildouble: 1
 ldouble: 1
 Test "jn (3, 10.0) == 0.0583793793051868123429354784103409563":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
+ifloat: 2
 ildouble: 1
 ldouble: 1
 Test "jn (3, 2.0) == 0.128943249474402051098793332969239835":
--- libc/sysdeps/s390/fpu/libm-test-ulps.jj	2003-12-11 22:23:20.000000000 +0100
+++ libc/sysdeps/s390/fpu/libm-test-ulps	2004-06-11 15:18:13.925962006 +0200
@@ -287,6 +287,9 @@ double: 1
 idouble: 1
 
 # erfc
+Test "erfc (0.75) == 0.288844366346484868401062165408589223":
+float: 1
+ifloat: 1
 Test "erfc (2.0) == 0.00467773498104726583793074363274707139":
 double: 1
 idouble: 1
@@ -534,8 +537,13 @@ float: 1
 idouble: 2
 ifloat: 1
 Test "y0 (10.0) == 0.0556711672835993914244598774101900481":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
+Test "y0 (2.0) == 0.510375672649745119596606592727157873":
+double: 1
+idouble: 1
 Test "y0 (8.0) == 0.223521489387566220527323400498620359":
 double: 1
 float: 1
@@ -547,7 +555,9 @@ Test "y1 (0.125) == -5.19993611253477499
 double: 1
 idouble: 1
 Test "y1 (1.5) == -0.412308626973911295952829820633445323":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "y1 (10.0) == 0.249015424206953883923283474663222803":
 double: 3
@@ -577,8 +587,13 @@ float: 1
 idouble: 2
 ifloat: 1
 Test "yn (0, 10.0) == 0.0556711672835993914244598774101900481":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
+Test "yn (0, 2.0) == 0.510375672649745119596606592727157873":
+double: 1
+idouble: 1
 Test "yn (0, 8.0) == 0.223521489387566220527323400498620359":
 double: 1
 float: 1
@@ -588,7 +603,9 @@ Test "yn (1, 0.125) == -5.19993611253477
 double: 1
 idouble: 1
 Test "yn (1, 1.5) == -0.412308626973911295952829820633445323":
+double: 1
 float: 1
+idouble: 1
 ifloat: 1
 Test "yn (1, 10.0) == 0.249015424206953883923283474663222803":
 double: 3
@@ -610,20 +627,24 @@ double: 1
 idouble: 1
 Test "yn (10, 0.75) == -2133501638.90573424452445412893839236":
 double: 1
-float: 1
+float: 2
 idouble: 1
-ifloat: 1
+ifloat: 2
 Test "yn (10, 1.0) == -121618014.278689189288130426667971145":
 double: 1
+float: 2
 idouble: 1
+ifloat: 2
 Test "yn (10, 10.0) == -0.359814152183402722051986577343560609":
-double: 1
+double: 2
 float: 1
-idouble: 1
+idouble: 2
 ifloat: 1
 Test "yn (10, 2.0) == -129184.542208039282635913145923304214":
-double: 2
-idouble: 2
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
 Test "yn (3, 0.125) == -2612.69757350066712600220955744091741":
 double: 1
 idouble: 1
@@ -804,7 +825,9 @@ idouble: 1
 
 Function: "erfc":
 double: 1
+float: 1
 idouble: 1
+ifloat: 1
 
 Function: "exp10":
 double: 6

	Jakub

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

* Re: [PATCH] Update ulps on i386/s390{,x} for GCC 3.4
  2004-06-11 13:45 [PATCH] Update ulps on i386/s390{,x} for GCC 3.4 Jakub Jelinek
@ 2004-06-11 16:16 ` Martin Schwidefsky
  2004-06-11 16:33   ` Jakub Jelinek
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Schwidefsky @ 2004-06-11 16:16 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Ulrich Drepper, Glibc hackers, Roland McGrath





Hi Jakub,

> ... and GCC 3.4 compiled libm on s390/s390x
> fails a bunch of tests for exceptions being raised/not-raised on NaN/Inf
> arguments in test-double (e.g. sqrt (NaN)).
> Will look into that next.
The reason for this is the generic implementation of __ieee754_sqrt.
I side stepped the problem by defining s390 specific function that
use the hardware instructions. See:

http://sources.redhat.com/ml/libc-alpha/2004-04/msg00119.html

blue skies,
   Martin

Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Schönaicherstr. 220, D-71032 Böblingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: schwidefsky@de.ibm.com


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

* Re: [PATCH] Update ulps on i386/s390{,x} for GCC 3.4
  2004-06-11 16:16 ` Martin Schwidefsky
@ 2004-06-11 16:33   ` Jakub Jelinek
  2004-06-11 16:41     ` Martin Schwidefsky
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Jelinek @ 2004-06-11 16:33 UTC (permalink / raw)
  To: Martin Schwidefsky; +Cc: Ulrich Drepper, Glibc hackers, Roland McGrath

On Fri, Jun 11, 2004 at 06:17:06PM +0200, Martin Schwidefsky wrote:
> > ... and GCC 3.4 compiled libm on s390/s390x
> > fails a bunch of tests for exceptions being raised/not-raised on NaN/Inf
> > arguments in test-double (e.g. sqrt (NaN)).
> > Will look into that next.
> The reason for this is the generic implementation of __ieee754_sqrt.
> I side stepped the problem by defining s390 specific function that
> use the hardware instructions. See:
> 
> http://sources.redhat.com/ml/libc-alpha/2004-04/msg00119.html

See my later patch which fixes this.
That is not to say it isn't good to switch to hw sqrt on s390{,x}
(assuming that it is faster than the generic one and precise).
Though, I don't think we should be actually removing ulps allowances
for older GCCs as long as we still support them.

	Jakub

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

* Re: [PATCH] Update ulps on i386/s390{,x} for GCC 3.4
  2004-06-11 16:33   ` Jakub Jelinek
@ 2004-06-11 16:41     ` Martin Schwidefsky
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Schwidefsky @ 2004-06-11 16:41 UTC (permalink / raw)
  To: Jakub Jelinek
  Cc: Ulrich Drepper, Glibc hackers, libc-hacker-owner, Roland McGrath





Hi Jakub,

> See my later patch which fixes this.
> That is not to say it isn't good to switch to hw sqrt on s390{,x}
> (assuming that it is faster than the generic one and precise).

Ok, I've seen your patch too late. I'll send a patch ontop of your
ulps changes that introduces the hw sqrt on s390*.

blue skies,
   Martin

Linux/390 Design & Development, IBM Deutschland Entwicklung GmbH
Schönaicherstr. 220, D-71032 Böblingen, Telefon: 49 - (0)7031 - 16-2247
E-Mail: schwidefsky@de.ibm.com


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

end of thread, other threads:[~2004-06-11 16:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-11 13:45 [PATCH] Update ulps on i386/s390{,x} for GCC 3.4 Jakub Jelinek
2004-06-11 16:16 ` Martin Schwidefsky
2004-06-11 16:33   ` Jakub Jelinek
2004-06-11 16:41     ` Martin Schwidefsky

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).