Original Post
Hi I dont quite understand why FLT_EPSILON contains
1.19209290E-07F. It says that its the smallest positive value so why it starts with 1.1
I've done a simple meaningless test which fails. why?
float smallest = FLT_EPSILON;
if( smallest < 0.0000001f )
{
// It never gets here? why I thought 0.0000001f is still positive and smaller value could be 0.00000001f (one more zero)
}
so if FLT_EPSILON is the smallest positive value why the if() fails? Is it something to do with the float precission.
Obviously I dont understand this clearly can you please explain.
I am basically trying to determine if some float X value is not 0.0f but can be near zero before rounding errors occur.
Second question.. Would it be actually correct to use epsilon for this case. Is it right test I am doing?
Thank you.
[edited by - papa on April 27, 2004 6:22:09 AM]