comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: S'Is_nan or S'Is_inf?
Date: Thu, 15 Jul 2010 23:03:39 +0100
Date: 2010-07-15T23:03:39+01:00	[thread overview]
Message-ID: <m239vkv1vo.fsf@pushface.org> (raw)
In-Reply-To: 84e62e80-ab37-45b3-bb6b-0d63633935f5@q12g2000yqj.googlegroups.com

Rod Chapman <roderick.chapman@googlemail.com> writes:

> On Jul 15, 10:00 pm, Warren <ve3...@gmail.com> wrote:
>> Is there any is not-a-number or is-infinity test support in
>> Ada05+ (for floats)?  Is there any being planned?  
>
> What is S'Valid supposed to return for an S which is
> a floating-point NaN???

I thought it was supposed to produce False, but all the AARM seems to
say (13.9.2) is that the value needs to be normal and have a valid
representation for 'Valid to return True. It also lists the
circumstances under which invalid data can be created: they don't look
to me as though they include

   NaN : constant Float := 0.0 / 0.0;

GNAT certainly reports 'Valid as False for +/-Inf & NaN.



  reply	other threads:[~2010-07-15 22:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-15 21:00 S'Is_nan or S'Is_inf? Warren
2010-07-15 21:30 ` Rod Chapman
2010-07-15 22:03   ` Simon Wright [this message]
2010-07-15 21:42 ` J-P. Rosen
2010-07-15 22:07 ` Simon Wright
2010-07-16  8:42   ` Dmitry A. Kazakov
2010-07-16 17:06     ` Warren
2010-07-16 19:39       ` Dmitry A. Kazakov
2010-07-16 22:35     ` Warren
2010-07-17  6:24       ` Simon Wright
2010-07-19 17:04         ` Warren
2010-07-17  7:40       ` Dmitry A. Kazakov
2010-07-19 17:18         ` Warren
2010-07-19 23:15 ` Randy Brukardt
2010-07-20 14:12   ` Warren
2010-07-20 16:20     ` Dmitry A. Kazakov
replies disabled

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