This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Serious bug


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]