This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Serious bug
- To: kabatek at chemie dot uni-halle dot de
- Subject: Re: Serious bug
- From: Nathan Sidwell <nathan at acm dot org>
- Date: Fri, 25 Sep 1998 09:03:50 +0100
- CC: Alexandre Oliva <oliva at dcc dot unicamp dot br>, egcs-bugs at cygnus dot com, egcs at cygnus dot com
- Organization: Computer Science Dept, Bristol University
- References: <Pine.LNX.3.96.980924171552.7010A-100000@rumcajs.chemie.uni-halle.de>
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