comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: How to check a Float for NaN
Date: Thu, 1 May 2008 14:22:35 -0500
Date: 2008-05-01T14:22:35-05:00	[thread overview]
Message-ID: <fvd5b0$psl$1@jacob-sparre.dk> (raw)
In-Reply-To: 4819f65b$1_1@glkas0286.greenlnk.net

"Stuart" <stuart@0.0> wrote in message
news:4819f65b$1_1@glkas0286.greenlnk.net...
> "Adam Beneschan" <adam@irvine.com> wrote in message
> news:fe6a8cc1-eac7-4b25-bd21-39f9c2015c4a@k1g2000prb.googlegroups.com...
...
> >> Would not 13.9.2(10) cover this:
> >>    "disrupting an assignment due to the failure of a language-defined
> >> check
> >> (see 11.6)"
> >
> > Did you read 11.6?
>
> I tried, but legalese is not my first language and I find some of the
> 'language lawyerly' stuff rather impenetrable at times. ;-)

If either of you can clearly understand and explain 11.6, then you need to
join the ARG immediately and explain it to us. ;-)

Seriously, 11.6 is a very murky part of the Standard, while everyone
understands what is generally intended, its not clear that the wording
actually has the right effect in many detailed cases. Nor is it clear
exactly what boundaries are correct. It was the best that the Ada 95 team
could do, and no one much wants to open the can of worms that it represents.

We had a series of lengthy and rather heated discussions about the data
validity model in Ada during the Amendment process. We were trying to fix
the Ada 95 problem that if an Unchecked_Conversion produces an invalid
result, using 'Valid to check that result made your program erroneous (thus,
'Valid could always return True in that case, and in fact at least one
compiler did that). We hacked around with the rules to eliminate that
particular problem (at the cost of making them much more complex).

But we weren't able to completely eliminate the problem (exceptions still
can be raised in this case): the problem being one camp that thinks that
there should be no checks on Unchecked_Conversion ever and the other camp
that will not allow valid objects to become invalid in any circumstances
(the alternative being erroneous execution, which is uncalled for for
something whose primary purpose is to eliminate checks). We ended up
compromising in the middle (I would have preferred to get rid of the
erroneousness completely, but at least the current rules don't require an
implementer to generate erroneous programs - you can make extra checks to
prevent it).

                                  Randy.





  reply	other threads:[~2008-05-01 19:22 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-30 10:27 How to check a Float for NaN Jerry
2008-04-30 10:47 ` christoph.grein
2008-04-30 10:50   ` christoph.grein
2008-04-30 15:02     ` Adam Beneschan
2008-04-30 20:33       ` Jerry
2008-04-30 23:23         ` Adam Beneschan
2008-05-01  1:00           ` Adam Beneschan
2008-05-01 19:52             ` Keith Thompson
2008-05-01 23:57               ` Jerry
2008-04-30 23:29       ` Randy Brukardt
2008-05-01  8:04       ` Stuart
2008-05-01 14:38         ` Adam Beneschan
2008-05-01 17:14           ` Stuart
2008-05-01 19:22             ` Randy Brukardt [this message]
2008-05-02  0:04         ` Jerry
2008-04-30 20:36 ` Jerry
2008-04-30 21:53   ` Adam Beneschan
2008-05-01  1:05     ` Jerry
2014-05-22  7:27   ` jan.de.kruyf
2014-05-22  8:09     ` Dmitry A. Kazakov
2014-05-22  9:24       ` Simon Wright
2014-05-22  9:48         ` Dmitry A. Kazakov
2014-05-22 15:28           ` Adam Beneschan
2014-05-22 16:31             ` Dmitry A. Kazakov
2014-05-22 23:33               ` Adam Beneschan
2014-05-23  7:38                 ` Dmitry A. Kazakov
2014-05-23 21:39                 ` Randy Brukardt
2014-05-27  8:35                   ` Dmitry A. Kazakov
2014-05-27 12:35                   ` Maurizio Tomasi
2014-05-27 15:53                     ` Adam Beneschan
2014-05-27 22:35                       ` Randy Brukardt
2014-05-27 22:59                         ` Jeffrey Carter
2014-05-28  7:32                         ` Dmitry A. Kazakov
2014-05-28  8:40                       ` Maurizio Tomasi
2008-05-05 18:23 ` Martin Krischik
2008-05-05 20:49   ` Adam Beneschan
2008-05-06 18:09     ` Jerry
2008-05-06 18:45       ` Wiljan Derks
2008-05-06 22:18         ` Adam Beneschan
2008-05-07 22:56           ` Randy Brukardt
2008-05-07 22:56           ` Randy Brukardt
2008-05-07 23:20             ` Adam Beneschan
2008-05-09  7:24             ` Stephen Leake
2008-05-10 17:00   ` anon
2008-05-11 22:00     ` Keith Thompson
2008-05-12  2:01       ` anon
2008-05-09 19:49 ` anon
2008-05-10  2:36   ` Jerry
2008-05-10  3:53     ` anon
2008-05-10  6:24       ` christoph.grein
2008-05-10  8:05     ` 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