2 ms·
I hope you aren’t testing for equality with pi or e or rho or square root of two. One and zero and -zero might be special cases. If you are testing max(0, pi) a
by lanstin 3y ago
I hope you aren’t testing for equality with pi or e or rho or square root of two. One and zero and -zero might be special cases. If you are testing max(0, pi) also you will be sad sometimes. Especially tho if you are doing computation and then testing for equality you will mostly be wrong.
What are the cases you are mentioning? Surely something more complex than a float for a loop variable? When the error is less than a threshold, when the sign changes, when the number of objects 8n a partition is one, I can’t think of a calculated float that would be a test for something with equality.