comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: simple question on long_float/short_float
Date: Sat, 02 Oct 2010 21:09:26 +0100
Date: 2010-10-02T21:09:26+01:00	[thread overview]
Message-ID: <m2fwwojr0p.fsf@pushface.org> (raw)
In-Reply-To: 1fwh82m3de16h$.7aw204c9j2tj.dlg@40tude.net

"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> I doubt it much. IEEE 754 is a normal floating-point + some
> non-numbers like NaN. As the name suggests, numeric computations are
> performed on *numbers*. IEEE 754 non-numbers might be useful for the
> languages with no means to deal with numeric errors. But in Ada you
> don't need that because Ada has numeric exceptions.

But GNAT doesn't raise numeric exceptions for floating-point
computations resuting in Inf or NaN ('Machine_Overflows is False).

You can use 'Valid, or you can define the range as Dmitry noted above
(range Float'Range, I think) in which case you get Constraint_Error on
overflow.



  reply	other threads:[~2010-10-02 20:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-30  6:17 simple question on long_float/short_float Nasser M. Abbasi
2010-09-30  6:58 ` J-P. Rosen
2010-09-30  8:31   ` Nasser M. Abbasi
2010-09-30  8:45     ` Nasser M. Abbasi
2010-09-30  9:59       ` Mark Lorenzen
2010-09-30 13:30       ` Peter C. Chapin
2010-09-30  8:46     ` AdaMagica
2010-09-30 10:02     ` Georg Bauhaus
2010-09-30 15:37     ` Jeffrey Carter
2010-09-30 18:22       ` Nasser M. Abbasi
2010-09-30 21:21       ` Peter C. Chapin
2010-10-01  0:29         ` Nasser M. Abbasi
2010-10-01 11:13           ` Peter C. Chapin
2010-10-02 19:57         ` Simon Wright
2010-09-30 15:56     ` Adam Beneschan
2010-10-02  9:11 ` Nasser M. Abbasi
2010-10-02  9:48   ` Dmitry A. Kazakov
2010-10-02 20:09     ` Simon Wright [this message]
2010-10-02  9:56   ` Nasser M. Abbasi
2010-10-02 10:45   ` cjpsimon
2010-10-02 16:52   ` Jeffrey Carter
2010-10-02 20:01     ` Georg Bauhaus
replies disabled

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