delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/05/03/05:15:03

From: fjh AT cs DOT mu DOT OZ DOT AU (Fergus Henderson)
Subject: Re: Floating Point Usage
3 May 1998 05:15:03 -0700 :
Message-ID: <19980503183508.41218.cygnus.gnu-win32@murlibobo.cs.mu.OZ.AU>
References: <01BD74F3 DOT 48BA8460 AT ts51ip86 DOT cadvision DOT com>
Mime-Version: 1.0
To: Dan Paslawski <paslawsk AT cadvision DOT com>
Cc: "'gnu-win32 AT cygnus DOT com'" <gnu-win32 AT cygnus DOT com>

On 01-May-1998, Dan Paslawski <paslawsk AT cadvision DOT com> wrote:
> I am porting an application from Linux to Windows NT which makes intensive
> usage of floating point operations.  I am finding slight differences in calculations
> between Linux (GNU Version ??) and Windows NT (using Cygwin32 B19.0), on the
> same machine.  To
> be specific, floating point operations such as multiplication and division are 
> occasionally producing differences (Linux vs WinNt) on the order of one or two bits.
> I would have thought the two OS's should produce identical results.

On x86, the floating point registers have more precision than
`double'; thus the results of a computation may depend on
when the compiler flushes intermediate results from registers
to memory.  Compiling with a different version of the compiler
or with different optimization flags may lead to different
results, even on the same OS.

-- 
Fergus Henderson <fjh AT cs DOT mu DOT oz DOT au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh AT 128 DOT 250 DOT 37 DOT 3        |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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