From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,23a8a20ef7e9405e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: S'Is_nan or S'Is_inf? Date: Thu, 15 Jul 2010 23:03:39 +0100 Organization: A noiseless patient Spider Message-ID: References: <84e62e80-ab37-45b3-bb6b-0d63633935f5@q12g2000yqj.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 15 Jul 2010 22:03:39 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="28974"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/b6YodmJ/4b40Zj8GwbcvdBCP06iIIhaY=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:eagX1dlOTlK3KsLl40tDUJUGkGA= sha1:TmdQttoStvSuOaF3WpFou7mVfKo= Xref: g2news1.google.com comp.lang.ada:12441 Date: 2010-07-15T23:03:39+01:00 List-Id: Rod Chapman writes: > On Jul 15, 10:00 pm, Warren 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.