This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Severe Bug in g77 and probably gcc
- To: kuehnel at pa dot msu dot edu, egcs-bugs at egcs dot cygnus dot com
- Subject: Re: Severe Bug in g77 and probably gcc
- From: N8TM at aol dot com
- Date: Wed, 8 Dec 1999 01:59:34 EST
In a message dated 12/7/99 8:00:55 PM Pacific Standard Time,
kuehnel@pa.msu.edu writes:
> omega = 0.6
> DO steps=1, 5
> CALL test(x0min)
> PRINT '( "testresult:",F8.2,2(1X,E14.6) )', omega,x0min
> omega = omega + 0.1
...
omega = 0.7
....
Well, it's good to know that you got the same results by various versions of
gcc and g77. No, 0.6 + 0.1 does not necessarily give the same result as 0.7.
Maybe if I put it in words "Calculate the nearest approximation with 24
binary bits of significance to 0.6. Do the same with 0.1. Add these
together and round off to 24 binary bits of significance. Calculate the
nearest approximation to 0.7 to 24 binary bits of significance. Compare the
last 2 results obtained, which would be the same if one of them did not
involve 2 additional roundings".
Amazing how old that code lifted from the 1986 edition looks.
Tim
tprince@computer.org