comp.lang.ada
 help / color / mirror / Atom feed
From: dewarr@my-dejanews.com
Subject: Re: Need exception despite Machine_Overflows is false
Date: 1998/12/19
Date: 1998-12-19T00:00:00+00:00	[thread overview]
Message-ID: <75guuf$gl7$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 367AA93A.3F8F1506@magic.fr

In article <367AA93A.3F8F1506@magic.fr>,
  Pascal MALAISE <malaise@magic.fr> wrote:
>
> > 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

The slow down will vary from machine to machine, but it is
a very big effect with properly programmed code, probably
a factor of 3-4 slowdown at least.

If you do not see such a slowdown, it is likely that you
have programmed poorly with respect to cache. For example
a naive matrix multiplication of matrices larger than the
cache is of course completely disastrous from an efficiency
point of view, and there are well known algorithms for
doing this properly. The moral as usual with fpt is that
unless you *really* know what you are doing, you are better
off using existing library routines for such purposes.


> Oh, I was not looking for a bug.
> The program makes pure mattrix multiplications and all I
> need is raising
> then
> handling the exception.

You should not need to rely on exceptions for this purpose.
The IEEE standard does not require that exceptions be
implemented (they are optional), and properly written
numerical algorithms should not need to rely on getting
such exceptions.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




      reply	other threads:[~1998-12-19  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
1998-12-19  0:00     ` dewarr [this message]
replies disabled

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