From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 16062 invoked from network); 29 Jul 1999 15:57:59 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 29 Jul 1999 15:57:58 -0000 Received: from saaz.cam.nist.gov (donahue@saaz.cam.nist.gov [129.6.88.116]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id LAA02377 for ; Thu, 29 Jul 1999 11:57:58 -0400 Received: (from donahue@localhost) by saaz.cam.nist.gov (8.8.7/8.8.7) id LAA17800; Thu, 29 Jul 1999 11:57:57 -0400 Date: Thu, 29 Jul 1999 11:57:57 -0400 Message-Id: <199907291557.LAA17800@saaz.cam.nist.gov> X-Authentication-Warning: saaz.cam.nist.gov: donahue set sender to donahue@saaz.cam.nist.gov using -f From: "Michael J. Donahue" To: axp-list@redhat.com In-reply-to: (message from Phil Carmody on Thu, 29 Jul 1999 15:32:24 +0100 (WET DST)) Subject: Re: Float Pt Precision Reply-to: michael.donahue@nist.gov (Michael Donahue) References: Phil Carmody wrote: >For every architecture, where e = machine epsilon: >(-1 + 1) + e == e >but > (1 + e) - 1 == e To be precise, e is the smallest number such that 1+e != 1. So if we take 0The a rule of thumb in these matters is to try to split the 'small' >data from the 'large' data, and handle all the 'small' data first before >it gets swamped by the 'large' data. > > >Oh - I was incorrect with my previous reference: >"What every computer scientist should know about floating point >arithmetic" is by Goldberg, not Kahan. However, it's 'in the style' of >similar things by Kahan. You can find some of Kahan's work at http://www.cs.berkeley.edu/~wkahan/. For example, How JAVA's Floating-Point Hurts Everyone Everywhere http://www.cs.berkeley.edu/~wkahan/JAVAhurt.pdf and Miscalculating Area and Angles of a Needle-like Triangle http://www.cs.berkeley.edu/~wkahan/Triangle.pdf The difference in the floating point calculations on the x86 vs the Alpha trace back to the hardware implementations. The extra precision in the x86 makes life much easier---it narrows the window of numerical instability in almost every situation. -m -- Michael J. Donahue National Institute of Standards and Technology Mathematical & Computational Sciences Division 100 Bureau Dr Stop 8910 Gaithersburg, MD 20899-8910 email: michael.donahue@nist.gov voice: (301) 975-5424 fax: (301) 990-4127 web: http://math.nist.gov/mcsd/Staff/MDonahue/