Mail Archives: djgpp/1996/01/31/01:39:47
On 30 Jan 1996, Russell Blackadar wrote:
> 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. Either way, he should try
The only way I can explain your all-zeroes result is if you compile that
source with no optimizations (and even then I'm not sure you could ever
get all zeroes with Gcc). Otherwise, storing a 80-bit internal x87
representation of a floating-point number into a 32-bit float will
*always* result in a relative error of about 1e-7.
The original poster said explicitly that the problem only pops up when
optimizations are turned on, as far as I remember.
- Raw text -