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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,17506301c0751a38 X-Google-Attributes: gid103376,public From: Pascal MALAISE Subject: Re: Need exception despite Machine_Overflows is false Date: 1998/12/18 Message-ID: <367AA93A.3F8F1506@magic.fr>#1/1 X-Deja-AN: 423967644 Content-Transfer-Encoding: 7bit References: <36796140.62B2788C@magic.fr> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ulysse.magic.fr X-Trace: ulysse.magic.fr 914008378 1892 127.0.0.1 (18 Dec 1998 19:12:58 GMT) Organization: Magic On Line Mime-Version: 1.0 NNTP-Posting-Date: 18 Dec 1998 19:12:58 GMT Newsgroups: comp.lang.ada Date: 1998-12-18T19:12:58+00:00 List-Id: Stephen Leake wrote: > You could try adding a range constraint to your basic floating point type: > > type Real is digits 9 range -1.0e307 .. +1.0e307; Fortunately I already had good "float" programming policy, I used: subtype REAL is LONG_FLOAT; Now, with: type REAL is digits 17 range -1.5E308 .. 1.5E308; I just need to add some use clauses for the stuff to compile. > As long as your limits are tighter than the machine limits, the > compiler will insert explicit checks. The detection is done now! > Of course, this will slow things down, it is not significant > but I assume you could remove the limits after you find the bug. Oh, I was not looking for a bug. The program makes pure mattrix multiplications and all I need is raising then handling the exception. > This is one reason not to use the predefined Float type! I knew some other reasons but not this one. Thank's very much. -- Pascal MALAISE (priv) mailto:malaise@magic.fr (prof) mailto:malaise@fr.airsysatm.thomson-csf.com