From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8362,c7637cfdf68e766 X-Google-Attributes: gidf8362,public X-Google-Thread: 107079,c7637cfdf68e766 X-Google-Attributes: gid107079,public X-Google-Thread: 103376,c7637cfdf68e766 X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,c7637cfdf68e766 X-Google-Attributes: gidf43e6,public X-Google-Thread: 109d8a,c7637cfdf68e766 X-Google-Attributes: gid109d8a,public From: eggert@twinsun.com (Paul Eggert) Subject: Re: floating point comparison Date: 1997/08/04 Message-ID: <5s5erh$m92$1@shade.twinsun.com>#1/1 X-Deja-AN: 262341199 Distribution: inet References: <01bc9dca$762b6000$e1e989cc@gort> Organization: Twin Sun Inc, El Segundo, CA, USA Newsgroups: comp.lang.ada,sci.math.num-analysis,comp.software-eng,comp.theory,sci.math Date: 1997-08-04T00:00:00+00:00 List-Id: dewar@merv.cs.nyu.edu (Robert Dewar) writes: > IEEE floating-point standard > is a well defined arithmetic system, with a well defined set of values > with well defined operations on them. True, but the IEEE standard is only well-defined at the machine level, and even then some options are left to the implementer (e.g. whether to round before or after tininess-checking during underflow detection). The hairiest part about relying on the IEEE standard is that there are no well-defined methods for mapping from the source language to the machine level. For example, can an implementer use an extra-long 80-bit representation instead of a 64-bit representation to implement double precision floating point? If you expect your answers to agree to the bit level, the answer is NO; but if you expect your code to run fast on the x86 architecture, you'd better relax your requirements and allow a bit of fuzz in your implementation. In other words, in practice, just because the hardware conforms to IEEE doesn't mean that your program will give the exact same answer that it did on some other IEEE-conforming platform.