Re: Optimizing IEEE Floating-Point Operations

henry@zoo.toronto.edu (Henry Spencer)
Mon, 17 Jun 1991 18:18:47 GMT

          From comp.compilers

Related articles
Optimizing IEEE Floating-Point Operations daryl@hpclopt.cup.hp.com (1991-06-06)
Re: Optimizing IEEE Floating-Point Operations bron@sgi.com (1991-06-11)
Optimizing IEEE Floating-Point Operations bill@hcx2.SSD.CSD.HARRIS.COM (1991-06-14)
Optimizing IEEE Floating-Point Operations eggert@twinsun.com (1991-06-14)
Optimizing IEEE Floating-Point Operations cfarnum@valhalla.cs.wright.edu (1991-06-17)
Re: Optimizing IEEE Floating-Point Operations henry@zoo.toronto.edu (1991-06-17)
Re: Optimizing IEEE Floating-Point Operations bill@hcx2.ssd.csd.harris.com (1991-06-18)
Re: Optimizing IEEE Floating-Point Operations jbc@hpcupt3.cup.hp.com (1991-06-19)
| List of all articles for this month |

Newsgroups: comp.compilers
From: henry@zoo.toronto.edu (Henry Spencer)
Keywords: arithmetic, Fortran
Organization: U of Toronto Zoology
References: 91-06-011 91-06-016
Date: Mon, 17 Jun 1991 18:18:47 GMT

In article 91-06-016 bill@hcx2.SSD.CSD.HARRIS.COM (Bill Leonard) writes:
>As far as I know, there is only _one_ kind of mathematics...


Sorry, that view has been obsolete for a century, ever since non-Euclidean
geometry started being taken seriously. You choose whichever mathematical
system is suited to the problems you want to tackle. It is not at all
difficult to find extended versions of the real numbers which feature things
like infinities as part of the number system. In fact, if you start looking
at the extended-real-number systems used in things like non-standard
analysis, you find "numbers" much stranger than anything in IEEE arithmetic.


>... NaNs and INFs represent a failure of the machine model to
>adequately represent the _mathematical_ result (i.e., the result you would
>get with infinite precision)...


Um, what *is* the "mathematical result" of, say, 1/0? Even in high-school
mathematics, that's illegal, i.e. NaN. In mathematical systems like the one
underlying IEEE arithmetic, it is +infinity. There is no approximation
involved; either one is an exact, mathematically correct result that would
not be affected in any way by use of infinite precision. Which is right, and
whether NaN is a representable value or simply results in an immediate
failure, depends on the number system in use.


It is important to realize that IEEE arithmetic is based on a slightly more
sophisticated view of the numerical world than that taught in high school,
and its implications cannot be understood in terms of high-school
mathematics.


It is also important to realize that you *cannot* reconcile the FORTRAN
standard with the IEEE arithmetic standard just by reading between the lines
intensively. Actual changes to FORTRAN would probably be needed to make it
consistent with IEEE arithmetic.
--
Henry Spencer @ U of Toronto Zoology, henry@zoo.toronto.edu utzoo!henry
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.