comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <jrcarter@acm.org>
Subject: Re: Trig Function Linking Problems
Date: Tue, 17 Apr 2007 00:22:44 GMT
Date: 2007-04-17T00:22:44+00:00	[thread overview]
Message-ID: <orUUh.59434$oV.54599@attbi_s21> (raw)
In-Reply-To: <1176755562.190964.167640@w1g2000hsg.googlegroups.com>

AJAskey wrote:
> 
> with ada.text_io;
>   use ada.text_io;
> with ada.numerics.elementary_functions;
> procedure TRIG is
>   a,b,c,d : float;
> begin
>   a := 3.1415/4.0;
>   b := ada.numerics.elementary_functions.sin(x=>a);
>   c := ada.numerics.elementary_functions.cos(x=>a);
>   d := ada.numerics.elementary_functions.tan(x=>a);
>   put_line("sin(a)" & float'image(b));
>   put_line("cos(a)" & float'image(c));
>   put_line("tan(a)" & float'image(d));
>   put_line("a     " & float'image(a));
> end TRIG;

>>From new system with : GNATMAKE 3.2.3-13  (20030502) Copyright
> 1995-2000 Free Software Foundation, Inc.
> gcc 3.2.3
> Linux Red Hat 3.2.3-53
> 
>>> gnatmake trig
> gcc -c trig.adb
> gnatbind -x trig.ali
> gnatlink trig.ali
> 
>>> trig
> 
> raised CONSTRAINT_ERROR : s-imgrea.adb:236

s-imgrea.adb is package System.Img_Real, used to implement Float'Image. 
Maybe it's a compiler error, or maybe there's something wrong with the 
values you're getting. What happens if you use Ada.Text_IO.Float_IO? You 
should also be able to find a newer version of the compiler and try it.

-- 
Jeff Carter
"My legs are gray, my ears are gnarled, my eyes are old and bent."
Monty Python's Life of Brian
81



  parent reply	other threads:[~2007-04-17  0:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-16 20:32 Trig Function Linking Problems AJAskey
2007-04-16 22:46 ` Jeffrey Creem
2007-04-16 23:39   ` Markus E Leypold
2007-04-17  9:59     ` AJAskey
2007-04-17 10:55       ` Markus E Leypold
2007-04-17 11:48         ` AJAskey
2007-04-17 12:05           ` Markus E Leypold
2007-04-17 12:32       ` Ludovic Brenta
2007-04-17  0:22 ` Jeffrey R. Carter [this message]
2007-04-17 16:58 ` Dirk Heinrichs
2007-04-17 18:54   ` AJAskey
2007-04-17 20:50     ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox