From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18923 invoked by alias); 13 May 2003 04:06:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 18827 invoked by uid 71); 13 May 2003 04:06:01 -0000 Date: Tue, 13 May 2003 04:06:00 -0000 Message-ID: <20030513040601.18812.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Brian May Subject: Re: ada/6911: Sin and Cos returns bad result or exception Reply-To: Brian May X-SW-Source: 2003-05/txt/msg01416.txt.bz2 List-Id: The following reply was made to PR ada/6911; it has been noted by GNATS. From: Brian May To: Dara Hazeghi 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