From: cts@kampong.aedinc.net ((null))
Subject: Re: C++ to Ada95 -- bitten!
Date: Sun, 10 Sep 2000 03:07:06 GMT
Date: 2000-09-10T03:07:06+00:00 [thread overview]
Message-ID: <uVCu5.3552$Ek.7557@newsfeed.slurp.net> (raw)
In-Reply-To: 6oBu5.666$zo.17816@news1.mts.net
In article <6oBu5.666$zo.17816@news1.mts.net>,
Nick J Chackowsky <nick@arcticmail.com> wrote:
>So just when I think I'm getting the idea of Ada95, along comes this
>problem, demonstrated by an admittedly contrived program. Gnat 3.13p crashes
>trying to compile this:
>
> with ada.float_text_io;
> with ada.numerics;
> with ada.numerics.elementary_functions;
> use ada.numerics.elementary_functions;
> procedure crash is
> f, g : float;
> begin
> ada.float_text_io.get(f);
> g := 2.7183 ** (-5340)/f + 21.5;
> end crash;
The compiler shouldn't crash no matter what kind of input you feed it.
You should send a bug report to ACT. The file gnatinfo.txt will explain
where and how to send the bug report.
[snip]
>I guess my question is, what _category_ of error is this? I know to look
>(now) for an integer in a floating-point calculation,
No, raising 2.7183 to an integer power is fine, what probably killed[1] the compiler was trying to figure out 2.7183 raised the to -5340 power.
--
=======================================================================
Life is short. | Craig Spannring
Bike hard, ski fast. | cts@internetcds.com
--------------------------------+------------------------------------
next prev parent reply other threads:[~2000-09-10 3:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-10 1:24 C++ to Ada95 -- bitten! Nick J Chackowsky
2000-09-10 2:28 ` Al Christians
2000-09-10 3:07 ` (null) [this message]
2000-09-10 4:49 ` Nick J Chackowsky
2000-09-10 7:39 ` Laurent Guerby
2000-09-10 15:47 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox