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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder3.cambriumusenet.nl!feeder2.cambriumusenet.nl!feed.tweaknews.nl!87.79.20.105.MISMATCH!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: S'Is_nan or S'Is_inf? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1tbp3geoa5yna$.171cmlfdrbm98$.dlg@40tude.net> Date: Fri, 16 Jul 2010 21:39:01 +0200 Message-ID: <1j63jyt4jfnni.z6ldwn62zaez.dlg@40tude.net> NNTP-Posting-Date: 16 Jul 2010 21:38:58 CEST NNTP-Posting-Host: cdde581a.newsspool4.arcor-online.net X-Trace: DXC=:k3c>NE8`3][7Non7UCi8U4IUK8jTAki8MUP X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:12446 Date: 2010-07-16T21:38:58+02:00 List-Id: On Fri, 16 Jul 2010 17:06:38 +0000 (UTC), Warren wrote: > Dmitry A. Kazakov expounded in news:1tbp3geoa5yna$.171cmlfdrbm98$.dlg@ > 40tude.net: > >> with Ada.Text_IO; use Ada.Text_IO; >> procedure IEEE is -- Only if Float is IEEE! >> Zero : Float := 0.0; >> Inf : Float := 1.0 / Zero; >> NaN : Float := 0.0 / Zero; >> begin >> Put_Line ("Valid " & Boolean'Image (Inf'Valid)); >> Put_Line ("In range " & Boolean'Image (Inf <= Float'Last)); >> Put_Line ("Self NaN " & Boolean'Image (NaN = NaN)); >> end IEEE; >> >> On an IEEE machine it could print 3x FALSE. > > On a non IEEE machine, is there going to be an exception > raised when dividing by zero? I would say yes. But theoretically if a non-IEEE machine has special representations of x/0, as IEEE does, then the compiler vendor is permitted not to raise Constraint_Error. Language lawyers? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de