Serious bug
Nathan Sidwell
nathan@acm.org
Fri Sep 25 06:33:00 GMT 1998
Ryszard Kabatek wrote:
> It is really a problem.
> It does disqualify `float' and `double'
> for a lot of applications on Intel.
>
> The sample below would produce wrong results on Intel,
> but right on other platforms:
Your definition of `wrong' is at variance wsith the C and C++ standards.
>From the C++ (draft) standard [expr.10]
the values of the floating point operands and results of
floating expressions may be represented in greater precision
and range than that required by the type...
The compiler does not have to be consistent about this. C and C++
programs which rely on a fixed precision are numerically unstable, and
therefore broken. Do not blame the compiler.
-ffloat-store can sometimes help. Read the manual and the C FAQ
nathan
--
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
You can up the bandwidth, but you can't up the speed of light
nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk
More information about the Gcc
mailing list