Advertisement

NaN to Zero in Floating Point?

Started by January 24, 2001 02:23 PM
0 comments, last by VyvyanBasterd 24 years ago
Is there a way to set a result of NaN (not a number) to equate to 0? I''m getting a problem where a floating point value is getting decremented to such a small amount that it eventually becomes NaN, instead of 0.0f. So the problem here is underflow. Does anyone know a way to prevent this from happening? Is there a setting anywhere that could be causing this? Thanks... Vyvyan
I am not entirely sure, but I think fp underflows can be caught as exceptions ( just like overflows & div_by_zero )

This topic is closed to new replies.

Advertisement