🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #12171

Re: IEEE arithmetic

#12171
From: David Seal
Date: Tue, 18 Jun 1991 16:55
53 lines
3026 bytes
In article <9106150144.AA14442@ucbvax.Berkeley.EDU> jbs@WATSON.IBM.COM
writes:

>           David Seal (quoting someone quoting the fortran standard):
>>The missing rule is (ANSI X3.9-1978 sect 6.6):
>>    "Any numeric operation whose result is not mathematically defined is
>>    prohibited in the execution of an executable program. Examples are
>>    dividing by zero and raising a zero-valued primary to a zero-valued or
>>    negative-valued power."
>>Who knows whether IEEE infinity is a "mathematically defined result"? If you
>I would think it isn't: it doesn't correspond to a single mathematical real
>number in the way that ordinary IEEE numbers do.
>
>           Some comments:
>     1.  The result of multiplying 2 reals is always mathematically de-
>fined.  Therefore I don't see how this clause prohibits multiplies which
>will overflow or underflow.

It doesn't prohibit the multiply itself. However, the multiply is followed
by an implicit rounding operation. In the case of an overflowing multiply
(and assuming we are restricting our "mathematical" number system to be the
reals), the rounding error in this rounding operation generates a non-real:
see below for my argument on this.

IMHO this entitles an implementation to prohibit such multiplies. (Though I
would of course expect any implementation that did so to produce a run-time
"overflow" error rather than quietly ignoring it and producing rubbish
results...)

>     2.  Ordinary IEEE numbers don't really correspond to single mathema-
>tical real numbers, they correspond to intervals.  Inf and -inf are just
>the names of the intervals on the ends.
>                       James B. Shearer

I don't think it's quite as simple as this. IEEE numbers produced as results
of operations do indeed correspond to intervals. On the other hand, IEEE
numbers used as operands are treated as if they correspond to single real
numbers. The process of using a result as the source to some other operation
is essentially where rounding errors appear.

When one of the intervals at the end is produced, this "rounding error"
causes the IEEE system to treat the result (an unbounded real interval) as
something which is *not* a real number. This is where IEEE departs from the
real number system.

If you want IEEE numbers to genuinely correspond to intervals, you've got to
do interval arithmetic with them :-).

David Seal
I believe the "From" line problem here has been fixed now. In case it isn't,
my correct email address is "dseal@armltd.co.uk".

All opinions are mine only...
Technical Details
Message-ID: <201@armltd.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!acorn!armltd!dseal
References: <9106150144.AA14442@ucbvax.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!mcsun!ukc!acorn!armltd!dseal
From: dseal@armltd.co.uk (David Seal)
Newsgroups: comp.arch
Subject: Re: IEEE arithmetic
Message-ID: <201@armltd.uucp>
Date: 18 Jun 91 16:55:10 GMT
References: <9106150144.AA14442@ucbvax.Berkeley.EDU>
Sender: dseal@armltd.uucp
Distribution: comp
Organization: A.R.M. Ltd, Swaffham Bulbeck, Cambs, UK
Lines: 53