public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: sidney@janis.pds.twi.tudelft.nl To: java-gnats@sourceware.cygnus.com Subject: libgcj/1206: strange result on Math.sin(1e50) Date: Wed, 20 Dec 2000 12:21:00 -0000 [thread overview] Message-ID: <20000215133756.15263.qmail@sourceware.cygnus.com> (raw) >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:
reply other threads:[~2000-12-20 12:21 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20000215133756.15263.qmail@sourceware.cygnus.com \ --to=sidney@janis.pds.twi.tudelft.nl \ --cc=java-gnats@sourceware.cygnus.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).