comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal MALAISE <malaise@magic.fr>
Subject: Re: Need exception despite Machine_Overflows is false
Date: 1998/12/18
Date: 1998-12-18T19:12:58+00:00	[thread overview]
Message-ID: <367AA93A.3F8F1506@magic.fr> (raw)
In-Reply-To: ug1ad8kyo.fsf@gsfc.nasa.gov

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




  parent reply	other threads:[~1998-12-18  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-17  0:00 Need exception despite Machine_Overflows is false Pascal MALAISE
1998-12-17  0:00 ` Matthew Heaney
1998-12-18  0:00   ` dewarr
1998-12-18  0:00     ` Matthew Heaney
1998-12-19  0:00       ` dewar
1998-12-18  0:00 ` Stephen Leake
1998-12-18  0:00   ` Matthew Heaney
1998-12-18  0:00   ` Pascal MALAISE [this message]
1998-12-19  0:00     ` dewarr
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox