Re: floating point

William D Clinger <will@ccs.neu.edu>
10 Oct 1998 01:05:26 -0400

          From comp.compilers

Related articles
Re: inlining + optimization = nuisance bugs luddy@concmp.com (Luddy Harrison) (1998-09-29)
Re: floating point, was inlining + optimization = nuisance bugs chase@world.std.com (David Chase) (1998-10-04)
Re: floating point will@ccs.neu.edu (William D Clinger) (1998-10-05)
Re: floating point comments@cygnus-software.com (Bruce Dawson) (1998-10-07)
Re: floating point will@ccs.neu.edu (William D Clinger) (1998-10-10)
Re: floating point dmcq@fano.demon.co.uk (David McQuillan) (1998-10-13)
Re: floating point darcy@CS.Berkeley.EDU (Joseph D. Darcy) (1998-10-19)
Re: floating point darcy@usul.CS.Berkeley.EDU (1998-10-24)
Re: floating point comments@cygnus-software.com (Bruce Dawson) (1998-11-01)
Re: floating point comments@cygnus-software.com (Bruce Dawson) (1998-11-01)
Re: floating point darcy@usul.CS.Berkeley.EDU (1998-11-06)
[6 later articles]
| List of all articles for this month |

From: William D Clinger <will@ccs.neu.edu>
Newsgroups: comp.compilers
Date: 10 Oct 1998 01:05:26 -0400
Organization: Northeastern University
References: 98-09-164 98-10-018 98-10-040 98-10-056
Keywords: arithmetic

Concerning the frequency of incorrect results caused by double
rounding to IEEE extended precision and then again to IEEE double
precision, Bruce Dawson wrote:


> Although, with rounding set to double precision they probably do get
> them 99.999% of the time - any other guesses?


About 99.9755859375 % = 1 - 2^12. The result of double rounding won't
be wrong unless the low-order 11 bits of the 64-bit significand are
10000000000. When that bit pattern occurs, then the result of
rounding a second time to double precision's 53-bit significand will
be wrong about half the time.


Will


Post a followup to this message

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