www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/30/13:33:36

Xref: news2.mv.net comp.lang.c:54394 comp.lang.c++:69882 comp.os.msdos.djgpp:654 gnu.g++.help:4424 gnu.gcc.help:5637
From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.lang.c,comp.lang.c++,gnu.gcc.help,gnu.g++.help,comp.os.msdos.djgpp
Subject: Re: float != float and floats as return types
Date: Tue, 30 Jan 1996 02:33:39 -0800
Organization: &tSftDotIotE
Lines: 31
Message-ID: <310DF403.2EDA7BBD@alcyone.com>
References: <4ej9lb$mpc AT fu-berlin DOT de> <310D4D9C DOT 7DAB2E1B AT alcyone DOT com> <4eke8g$64m AT colossus DOT holonet DOT net>
NNTP-Posting-Host: newton.alcyone.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Russell Blackadar wrote:

> What is surprising is that all the columns are not zero!  The original poster
> was offering some speculations as to how that might have happened, but as you
> say (and I think he'd agree) it doesn't wash.  I ran his posted code and
> got all zeroes.  Either there's a *serious* problem with his compiler, or the
> posted code is not the same as what he compiled.

Not at all.  Systematic errors are expected when using floating point
computations.

Under gcc 2.6.3 for Linux, his program prints the following:

| 0       0       0
| 0       3.21547e-11     3.21547e-11
| 0       1.28619e-10     1.28619e-10
| 0       -1.25443e-09    -1.25443e-09
| 0       5.14475e-10     5.14475e-10
| 0       7.14357e-10     7.14357e-10
| 0       -5.01772e-09    -5.01772e-09
| 0       -1.46904e-08    -1.46904e-08
| 0       2.0579e-09      2.0579e-09
| 0       -2.02694e-09    -2.02694e-09


-- 
Erik Max Francis, &tSftDotIotE. && max AT alcyone DOT darkside DOT com || max AT alcyone DOT com
San Jose, California, U.S.A. && 37 20 07 N 121 53 38 W && the 4th R is respect
H.3`S,3,P,3$S,#$Q,C`Q,3,P,3$S,#$Q,3`Q,3,P,C$Q,#(Q.#`-"C`- && 1love && folasade
Omnia quia sunt, lumina sunt. && GIGO Omega Psi && http://www.alcyone.com/max/
"Out from his breast/his soul went to seek/the doom of the just." -- _Beowulf_

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019