Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: billm@melbpc.org.au (Bill Metzenthen)
Subject: Re: division by zero exceptions ?
Date: 1998/10/31	[thread overview]
Message-ID: <slrn73l95u.bkj.billm@lorentz.melbpc.org.au> (raw)
In-Reply-To: 01be0482$6ebd1e60$45934b0c@default

On 31 Oct 1998 02:59:33 GMT, Shana Tackett <sltackett@worldnet.att.net> wrote:
>The Alpha has much better exception handling than the PII. The PII is
>setting the register to INF upon division 
>by zero and continues processing. To me the Alpha is correct. You have
>asked the processor to do something
>which does not make sense and it has reported an error. Whereas the PII has
>returned an answer which has to
>interpreted as being an invalid answer. A lot of sloppy mathematical code
>will run fine on an Intel chip producing
>a result which really has no meaning. This is not so on an Alpha. It is
>better to get no answer than an answer
>which is spurious and can be wrongly interpreted as correct. Hence write
>and develop your code on the alpha this way it
>will be thoroughly tested. There are instructions in AXP which allow you to
>specifiy a function to be called upon
>a floating point exception and have the function handle the error. So it is
>possible to get the same result, although
>I would not want to.
>
>This is one of the main reasons for complications for poorly written
>mathematics code to not be easily ported from
>Intel to Alpha.
>

No.  This is not an issue of Intel versus Alpha.  The behaviour on
Intel-based Linux machines is a result of a deliberate decision made
for later versions of libc (earlier versions caused SIGFPE).  On Intel
machines, you can get the type of behaviour which you describe for the
Alpha by linking in code such as that which you will find on my web
pages.  There is also a discussion of this issue and other floating
point matters there.


-- 
-----------------------------------------------------------------------------
Bill Metzenthen        | See http://www.suburbia.net/~billm/ for information
billm@melbpc.org.au    | on an 80x87 FPU emulator, using floating point
billm@suburbia.net     | (particularly on Linux), and code for manipulating
Melbourne, Australia   | the floating point environment on 80x86 Linux.
-----------------------------------------------------------------------------



      parent reply	other threads:[~1998-10-31  5:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-26  5:00 division by zero exceptions ? Conrad Sanderson
1998-10-26  5:00 ` Michal Jaegermann
1998-10-27  5:00 ` Remco Wouts
1998-10-28  5:00   ` Nils Faerber
1998-10-31  5:00 ` Shana Tackett
1998-10-30  5:00   ` James D. Freels
1998-10-31  5:00     ` Toon Moene
1998-10-31  5:00       ` Anthony W. Youngman
1998-11-01  5:00         ` Bill Metzenthen
1998-11-01  5:00           ` Anthony W. Youngman
1998-11-02  5:00             ` Bill Metzenthen
1998-11-02  5:00               ` Conrad Sanderson
1998-11-02  5:00             ` Stefan Davids
1998-11-01  5:00         ` Stefan Davids
1998-11-02  5:00         ` Michal Jaegermann
1998-10-31  5:00     ` Greg Lindahl
1998-11-03  5:00     ` rscanon
1998-10-31  5:00   ` Anthony W. Youngman
1998-11-01  5:00     ` Greg Lindahl
1998-10-31  5:00   ` Bill Metzenthen [this message]
read-only archive

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