delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/29/21:20:38

Xref: news2.mv.net comp.lang.c:54265 comp.lang.c++:69753 comp.os.msdos.djgpp:632 gnu.g++.help:4410 gnu.gcc.help:5625
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: Mon, 29 Jan 1996 14:43:40 -0800
Organization: &tSftDotIotE
Lines: 20
Message-ID: <310D4D9C.7DAB2E1B@alcyone.com>
References: <4ej9lb$mpc AT fu-berlin DOT de>
NNTP-Posting-Host: newton.alcyone.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Axel Thimm wrote:

> At first I thought all numbers should be zeros. The middle column might
> not be zero, if the compiler calculates in higher precision than what
> the variables are, so an intermediate storage (b) might loose some
> digits, but I cannot understand what happens with c! Both times a
> function is called, that _is_not_ inlined, so in both cases the same
> loss of digits should be observed.
> Any ideas?

I don't understand what you find surprising.  Both the second and third column
have the same computation, except that in one of the x^2 function is inlined
and in the other it is called through a function.  In either case, you get
exactly the same value.  What is the objection?
-- 
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