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: 107079,c7637cfdf68e766 X-Google-Attributes: gid107079,public X-Google-Thread: 109d8a,c7637cfdf68e766 X-Google-Attributes: gid109d8a,public X-Google-Thread: f8362,c7637cfdf68e766 X-Google-Attributes: gidf8362,public X-Google-Thread: f43e6,c7637cfdf68e766 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,c7637cfdf68e766 X-Google-Attributes: gid103376,public From: eggert@twinsun.com (Paul Eggert) Subject: Re: floating point comparison Date: 1997/08/14 Message-ID: <5t08g3$4jn$1@shade.twinsun.com>#1/1 X-Deja-AN: 268335403 Distribution: inet References: <01bc9dca$762b6000$e1e989cc@gort> <5s5erh$m92$1@shade.twinsun.com> 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-14T00:00:00+00:00 List-Id: dewar@merv.cs.nyu.edu (Robert Dewar) writes: > your comment on efficiency on the x86 is technically wrong. You can place > the x86 floating-point into 64 bit mode, so that there is no efficiency > penalty, and indeed at least some C compilers on the x86 do this. But in 64-bit mode, the x86 doesn't round denormalized numbers properly. It simply rounds the mantissa at 53 bits, resulting in a double-rounding error. The proper behavior is to round at fewer bits. If you know of an efficient workaround for this problem I'd love to hear about it! Otherwise, I still think that you'll need to live with some fuzz in your x86 IEEE double implementation, unless you are willing to suffer a performance penalty.