public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: ada/6911: Sin and Cos returns bad result or exception
@ 2002-11-22 13:59 Brian May
  0 siblings, 0 replies; 5+ messages in thread
From: Brian May @ 2002-11-22 13:59 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR ada/6911; it has been noted by GNATS.

From: Brian May <bam@snoopy.apana.org.au>
To: Joakim Olsson <joakim.olsson@hiq.se>
Cc: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	148529@bugs.debian.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Subject: Re: ada/6911: Sin and Cos returns bad result or exception
Date: Mon, 18 Nov 2002 14:46:24 +1100

 On Thu, Nov 14, 2002 at 11:23:28AM +0100, Joakim Olsson wrote:
 > I have'nt a clue where this mail is going so bare with me (I'm a newbie to gcc ;-)
 
 It come to me, and the Debian BTS (148529@bugs.debian.org).
 
 Presumably it also went into the gcc GNATS system.
 
 The nobody@gcc.gnu.org address looks kind of funny...
 
 > This package implements Sin and Cos and other stuff with assambler-instructions
 > and not uses interface to the C-functions in libm.a.
 
 The assembler code appears to be exactly the same on gnat 3.14p,
 where it works. In fact, I think the whole file is the same.
 
 > I don't know why but,,, well the assambler doesn't work.
 
 I suspect that support for any assembler code is badly broken, but my
 knowledge of assembler code in Ada is somewhat flakey. I tried moving
 the assembler code to me source code, but it stopped working even with
 gnat 3.14p, which was perviously working.
 
 It wouldn't surprise me if the assembler code is working, but
 for some reason that parameters aren't getting passed to/from
 the Ada code.
 
 At one stage I did look at this using a debugger and viewing
 the assembler code, but I couldn't see anything that looked
 obviously wrong.
 
 > In the rpm from Ada for Linux Team the version uses interface to
 > C-functions and that version seems to work.
 >
 >
 > PSIf I've done something wrong by posting this mail, pleas don't
 
 Nothing wrong that I am aware of.
 
 >   hesitate to tell me. Is there a simple solution out there ??? please
 >   tell me. DS
 
 Create interfaces to the C-functions?
 
 Use gnat 3.14?
 
 Sorry, these are the only two solutions I know of (not tested the first
 one myself).
 --
 Brian May <bam@snoopy.apana.org.au>


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

* Re: ada/6911: Sin and Cos returns bad result or exception
@ 2003-05-13  6:38 steven
  0 siblings, 0 replies; 5+ messages in thread
From: steven @ 2003-05-13  6:38 UTC (permalink / raw)
  To: 148529, bam, gcc-bugs, gcc-prs, nobody

Synopsis: Sin and Cos returns bad result or exception

State-Changed-From-To: open->closed
State-Changed-By: steven
State-Changed-When: Tue May 13 06:37:57 2003
State-Changed-Why:
    Reported fixed after Dara asked for feedback

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6911


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

* Re: ada/6911: Sin and Cos returns bad result or exception
@ 2003-05-13  4:06 Brian May
  0 siblings, 0 replies; 5+ messages in thread
From: Brian May @ 2003-05-13  4:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

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>


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

* Re: ada/6911: Sin and Cos returns bad result or exception
@ 2003-05-12 23:36 Dara Hazeghi
  0 siblings, 0 replies; 5+ messages in thread
From: Dara Hazeghi @ 2003-05-12 23:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR ada/6911; it has been noted by GNATS.

From: Dara Hazeghi <dhazeghi@yahoo.com>
To: 148529@bugs.debian.org, gcc-gnats@gcc.gnu.org, bam@snoopy.apana.org.au,
   nobody@gcc.gnu.org, fw@deneb.enyo.de
Cc:  
Subject: Re: ada/6911: Sin and Cos returns bad result or exception
Date: Mon, 12 May 2003 16:31:18 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 trail&database=gcc&pr=6911
 
 Hello,
 
 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,
 
 Dara
 


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

* Re: ada/6911: Sin and Cos returns bad result or exception
@ 2002-11-20 13:56 Joakim Olsson
  0 siblings, 0 replies; 5+ messages in thread
From: Joakim Olsson @ 2002-11-20 13:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR ada/6911; it has been noted by GNATS.

From: Joakim Olsson <joakim.olsson@hiq.se>
To: bam@snoopy.apana.org.au, gcc-gnats@gcc.gnu.org,
 	gcc-prs@gcc.gnu.org, 148529@bugs.debian.org,
 	gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: ada/6911: Sin and Cos returns bad result or exception
Date: Thu, 14 Nov 2002 11:23:28 +0100

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6911
 
 Hi
 
 I have'nt a clue where this mail is going so bare with me (I'm a newbie to gcc ;-)
 
 I've noticed the same bug with 3.1 and 3.2 on RedHat PC-Intel.
 
 I couldn't find a solution in the database so I'm posting my analyse here.
 
 
 The configure seems to do something wrong.
 There are several versions of the package "Ada.Numerics.Aux" and
 the version that is used is the one called 86numaux.ads and it's body.
 This package implements Sin and Cos and other stuff with assambler-instructions
 and not uses interface to the C-functions in libm.a.
 
 I don't know why but,,, well the assambler doesn't work.
 
 In the rpm from Ada for Linux Team the version uses interface to C-functions and that version seems to work.
 
 
 PS
 If I've done something wrong by posting this mail, pleas don't hesitate to tell me.
 Is there a simple solution out there ??? please tell me.
 DS
 
 best regards
 /joakim olsson
 HiQ Approve AB
 SWEDEN
 
 
 


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

end of thread, other threads:[~2003-05-13  6:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-22 13:59 ada/6911: Sin and Cos returns bad result or exception Brian May
  -- strict thread matches above, loose matches on Subject: below --
2003-05-13  6:38 steven
2003-05-13  4:06 Brian May
2003-05-12 23:36 Dara Hazeghi
2002-11-20 13:56 Joakim Olsson

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