public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libgcj/1206: strange result on Math.sin(1e50)
@ 2000-12-20 12:21 sidney
0 siblings, 0 replies; only message in thread
From: sidney @ 2000-12-20 12:21 UTC (permalink / raw)
To: java-gnats
>Number: 1206
>Category: libgcj
>Synopsis: strange result on Math.sin(1e50)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: green
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 20 12:17:34 PST 2000
>Closed-Date: Wed Jun 07 00:11:39 PDT 2000
>Last-Modified: Wed Jun 7 00:16:00 PDT 2000
>Originator: Sidney Cadot
>Release: 2.95.2
>Organization:
>Environment:
Debian GNU/Linux (potato)
>Description:
Math.sin(1e50) yields 1e50 as a result. Not surprisingly,
the same call yields different results on Sun's java for
different platforms (eg., Linux, Sparc) but at least those
are in the [-1..1] range.
>How-To-Repeat:
public final class IEEETorture {
static public void main(String args[])
{
System.out.println(Math.sin(1e50));
}
}
>Fix:
>Release-Note:
>Audit-Trail:
Formerly PR java.lang/151
From: Tom Tromey <tromey@cygnus.com>
To: sidney@janis.pds.twi.tudelft.nl
Cc: java-gnats@sourceware.cygnus.com
Subject: Re: gcj/151: strange result on Math.sin(1e50)
Date: Tue, 15 Feb 2000 11:03:05 -0800 (PST)
I tried this on my x86 Linux box.
I'm using the latest gcc and libgcj.
It worked fine for me:
creche. gcj -g -o m --main=m -Wl,-rpath,/x1/egcs/install//lib m.java
creche. ./m
-0.4805001434937588
Could you try writing the equivalent C program?
That would tell us whether the bug is in the Java code or is
elsewhere.
Tom
Responsible-Changed-From-To: apbianco->green
Responsible-Changed-By: green
Responsible-Changed-When: Sun Mar 5 00:31:33 2000
Responsible-Changed-Why:
I have the answer.
State-Changed-From-To: open->feedback
State-Changed-By: green
State-Changed-When: Sun Mar 5 00:31:33 2000
State-Changed-Why:
natMath.cc is using the macro's defined in glibc's
mathinline.h and glibc's sin macro is giving the wrong
answer. The trick is to not use those macros. I'm
checking in a patch to do this.
From: green@cygnus.com
To: apbianco@cygnus.com, green@cygnus.com, java-gnats@sourceware.cygnus.com,
sidney@janis.pds.twi.tudelft.nl
Cc:
Subject: Re: java.lang/151
Date: 5 Mar 2000 08:31:33 -0000
Synopsis: strange result on Math.sin(1e50)
Responsible-Changed-From-To: apbianco->green
Responsible-Changed-By: green
Responsible-Changed-When: Sun Mar 5 00:31:33 2000
Responsible-Changed-Why:
I have the answer.
State-Changed-From-To: open->feedback
State-Changed-By: green
State-Changed-When: Sun Mar 5 00:31:33 2000
State-Changed-Why:
natMath.cc is using the macro's defined in glibc's
mathinline.h and glibc's sin macro is giving the wrong
answer. The trick is to not use those macros. I'm
checking in a patch to do this.
http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=151&database=java
State-Changed-From-To: feedback->closed
State-Changed-By: bryce
State-Changed-When: Wed Jun 7 00:11:39 2000
State-Changed-Why:
Anthony checked in a fix for this long ago, and it works fine for me.
From: bryce@albatross.co.nz
To: green@cygnus.com, java-gnats@sourceware.cygnus.com,
sidney@janis.pds.twi.tudelft.nl
Cc:
Subject: Re: java.lang/151
Date: 7 Jun 2000 07:11:39 -0000
Synopsis: strange result on Math.sin(1e50)
State-Changed-From-To: feedback->closed
State-Changed-By: bryce
State-Changed-When: Wed Jun 7 00:11:39 2000
State-Changed-Why:
Anthony checked in a fix for this long ago, and it works fine for me.
http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=151&database=java
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-12-20 12:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:21 libgcj/1206: strange result on Math.sin(1e50) sidney
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).