comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@largo.mitre.org (Robert I. Eachus)
Subject: Re: float constraint checks
Date: 12 Jun 91 21:16:53	[thread overview]
Message-ID: <EACHUS.91Jun12211653@largo.mitre.org> (raw)
In-Reply-To: tedg@apollo.HP.COM's message of 12 Jun 91 19:00:54 GMT


In article <1991Jun12.190054.27094@apollo.hp.com> tedg@apollo.HP.COM (Ted Grzesik) writes:

   I have a question regarding constraint checks of floating point assignments.

   The LRM (3.5.7) does not make it clear to me whether my compiler is failing to give a CONSTRAINT_ERROR in the following situation...

   Note: All code not shown.

   First of all, I assume the reference was to 4.5.7.  But under no
circumstances should this program raise CONSTRAINT_ERROR.  You seem to
believe that there should be an underflow check, but the Ada floating
point model has no such concept.  (All results which might be
considered as underflow are represented by ANY value in a range
bounded inclusively by zero and the smallest positive or negative
safe number.)

   Where underflow and reduced acuracy are concerns in Ada, you either
have to define your own floating-point operators (which for example
would raise UNDERFLOW_ERROR), or use scaling and fixed point.

--

					Robert I. Eachus

with STANDARD_DISCLAIMER;
use  STANDARD_DISCLAIMER;
function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...

  reply	other threads:[~1991-06-12 21:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-06-12 19:00 float constraint checks Ted Grzesik
1991-06-12 21:16 ` Robert I. Eachus [this message]
     [not found] <190054@<1991Jun12>
1991-06-14 17:23 ` stt
replies disabled

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