On Mon, Nov 12, 2007 at 12:33:41PM -0800, Andy Dougherty wrote: > It may well be there's an issue with gcc's optimizer, since the problem > goes away without optimization, but I think it's also fair to say that > the definition of FLOAT_IS_ZERO in include/parrot/misc.h is > perhaps not optimal here. I'd prefer the simpler definition: > > #define FLOAT_IS_ZER0(f) ((f) == 0.0) > > but I didn't get anywhere last time I proposed that. I don't know > what else to do.
I suggested f >= 0.0 && f <= 0.0 which I believe is identical, even in the face of NaNs, but should also shut up the whining, er, warning, about comparison. Because I would be so bold as to say that the constant zero would be exempted from any useful warning about floating point equality check. Nicholas Clark