gcc really, really ought to specify more precisely what floating point
semantics one can depend on.
Bug 323, paraphrased, says "floating point comparisons return random
numbers". Ok, that's pumping it a bit, but consider the following
qsort comparison function right out of K&R 2nd Edition page 1
On Thu, 6 Apr 2006, Daniel Bratell wrote:
> that it would be safe to use that flag unless I relied on extreme
> precision or behaviour related to NaN or +-Inf, and that normal simple
> arithmetics should still give the same result.
Unfortunately, with -ffast-math simple arithemtics no longer have
Daniel Bratell writes:
> This is likely to be the one FAQ you've all learned to answer but
> as I was bitten by it, I just wanted to make sure that what I saw
> was expected.
>
> I've used -ffast-math for a slight speedup of floating point
> arithmetics, but I've also used doubles to store
Hi,
This is likely to be the one FAQ you've all learned to answer but as I
was bitten by it, I just wanted to make sure that what I saw was expected.
I've used -ffast-math for a slight speedup of floating point
arithmetics, but I've also used doubles to store integers. Since
integers (up to