InterviewSolution
Saved Bookmarks
| 1. |
Is it safe to use the == operator to determine whether objects of type float are equal? |
|
Answer» As has been shown comparing two floats (or DOUBLES ETC) can be problematic. GENERALLY, instead of comparing for exact equality they should be CHECKED against an error bound. If they are WITHIN the error bound, they are considered equal. |
|