Jim Wilson wrote: > FWIW that doesn't sound like a "good programming practices" sort of > function. A quick test before executing division isn't very > expensive (no worse than an isnan).
Actually, untrapped division by zero produces a positive or negative infinity, not a NaN. The idea of a NaN is that it is never produced as the result of an FPU operation involving non-NaN values. This is actually a useful feature -- Nasal uses this property to store a pointer in a union with a double without fear of confusing the two. But I agree -- checking for NaNs after the fact is a little like checking for a null pointer. If they're showing up at all, they are a the result of a bug. Using isnan() for non-debug situtations is probably just going to hide problems. Andy _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
