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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,31c0457c1c47fc2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-25 09:17:52 PST Sender: sjw@galadriel.frlngtn.gecm.com Newsgroups: comp.lang.ada Subject: Re: Have you ever had a bug caused by... References: <27085883.0110191714.784d3d25@posting.google.com> <9r25o0$fla$1@nh.pace.co.uk> <9r2f090nu2@drn.newsguy.com> From: Simon Wright Date: 25 Oct 2001 17:09:07 +0100 Message-ID: Organization: Alenia Marconi Systems, ISD, Farlington X-Newsreader: Gnus v5.5/Emacs 20.3 NNTP-Posting-Host: galadriel.frlngtn.gecm.com X-Trace: 25 Oct 2001 17:05:58 GMT, galadriel.frlngtn.gecm.com Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!ossa.telenet-ops.be!skynet.be!skynet.be!grolier!btnet-peer0!btnet-peer1!btnet-feed5!btnet!newreader.ukcore.bt.net!pull.gecm.com!galadriel.frlngtn.gecm.com Xref: archiver1.google.com comp.lang.ada:15190 Date: 2001-10-25T17:09:07+01:00 List-Id: Robert*@ writes: > Yes, Ada does even more today than Java/C/C++. None of those other > languages for example will detect a floating point > overflow/underflow at run-time, but Ada will. On Linux, GNAT's Float'Machine_Overflows is false. with GNAT.IO; procedure Fred is Last : Float := Float'Last; begin GNAT.IO.Put_Line (Float'Machine_Overflows'Img); GNAT.IO.Put_Line (Last'Img); Last := Last * 2.0; GNAT.IO.Put_Line (Last'Img); end Fred; outputs FALSE 3.40282E+38 +Inf******* -- Simon Wright Email: simon.j.wright@amsjv.com Alenia Marconi Systems Voice: +44(0)23 9270 1778 Integrated Systems Division FAX: +44(0)23 9270 1800