public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Brian May <bam@snoopy.apana.org.au> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: ada/6911: Sin and Cos returns bad result or exception Date: Tue, 13 May 2003 04:06:00 -0000 [thread overview] Message-ID: <20030513040601.18812.qmail@sources.redhat.com> (raw) The following reply was made to PR ada/6911; it has been noted by GNATS. From: Brian May <bam@snoopy.apana.org.au> To: Dara Hazeghi <dhazeghi@yahoo.com> Cc: 148529@bugs.debian.org, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org, fw@deneb.enyo.de Subject: Re: ada/6911: Sin and Cos returns bad result or exception Date: Tue, 13 May 2003 14:05:30 +1000 On Mon, May 12, 2003 at 04:31:18PM -0700, Dara Hazeghi wrote: > the final note in the Debian bug trail for this bug noted that this > problem was fixed on gcc 3.3 branch. Is this the case? Right now, > mainline and 3.3 branch produce this for me: > > -7.07105E-01 > 0.00000E+00 > -8.74228E-08 > 1.74846E-07 > -7.07105E-01 > > (the second testcase). Can anyone confirm the state of this bug. Thanks, For: --- cut --- with Ada.Text_IO; use Ada.Text_IO; with Ada.Numerics; use Ada.Numerics; with Ada.Numerics.Generic_Elementary_Functions; with Aux; use Aux; procedure TestBug2 is type F is new Float; subtype Radians is F; package Maths is new Generic_Elementary_Functions(F); use Maths; begin Ada.Text_IO.Put_Line(Double'Image(Aux.Sin(5.49779))); Ada.Text_IO.Put_Line(Double'Image(Aux.Sin(0.0*pi))); Ada.Text_IO.Put_Line(Double'Image(Aux.Sin(1.0*pi))); Ada.Text_IO.Put_Line(Double'Image(Aux.Sin(2.0*pi))); Ada.Text_IO.Put_Line(Double'Image(Aux.Sin(5.49779))); Ada.Text_IO.Put_Line(F'Image(Sin(5.49779))); Ada.Text_IO.Put_Line(F'Image(Sin(0.0*pi))); Ada.Text_IO.Put_Line(F'Image(Sin(1.0*pi))); Ada.Text_IO.Put_Line(F'Image(Sin(2.0*pi))); Ada.Text_IO.Put_Line(F'Image(Sin(5.49779))); end TestBug2; --- cut --- I get: --- cut --- -7.07104761532644598E-01 0.00000000000000000E+00 -5.42101086242752217E-20 1.08420217248550443E-19 -7.07104761532644598E-01 -7.07105E-01 0.00000E+00 -8.74228E-08 1.74846E-07 -7.07105E-01 --- cut --- Which looks much better then before, but I haven't checked the results against a calculator... This is the same code that failed before. -- Brian May <bam@snoopy.apana.org.au>
next reply other threads:[~2003-05-13 4:06 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-05-13 4:06 Brian May [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-05-13 6:38 steven 2003-05-12 23:36 Dara Hazeghi 2002-11-22 13:59 Brian May 2002-11-20 13:56 Joakim Olsson
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=20030513040601.18812.qmail@sources.redhat.com \ --to=bam@snoopy.apana.org.au \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@gcc.gnu.org \ /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).