www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/01/19/10:27:45

From: dj AT delorie DOT com (DJ Delorie)
Subject: Re: double != long double
19 Jan 1999 10:27:45 -0800 :
Message-ID: <199901191755.MAA10772.cygnus.cygwin32.developers@envy.delorie.com>
References: <199901191736 DOT LAA22566 AT modi DOT xraylith DOT wisc DOT edu>
To: khan AT xraylith DOT wisc DOT edu
Cc: cygwin32-developers AT cygnus DOT com

> Smiley notwithstanding, the particular problem we're discussing is an
> issue that has nothing to do with MS compatibility, but rather to do
> with sensible numerical computation.

Yes, but it originated by someone saying that MS headers had "long
double" and expected a 64-bit value to be sent.  This changed the
sizes of structures, stack, etc.  Regardless of the precision used
internally, sizeof(long double) is different for gcc (12) vs MSVC (8).
This was the original complaint.

> Please take a look at the link that I had posted earlier to see an example
> of a piece of code that we should be able to take for granted on any
> platform, but it breaks horribly on x86/gcc. 
> 
> DJ, could you please run the code snippet on DJGPP and see what you get?

I suspect that DJGPP has the same problems as, say, Linux, as it
leaves the FPU in 80-bit precision mode, although DJGPP has a function
to change it at the program's request.

However, testing shows that neither DJGPP (gcc 2.8.1) nor Linux (gcc
2.7.2.3 or egcs 1.1.1) ever return a negative number (egcs returns
"1"), no matter how I compile it.

- Raw text -


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