S SearchRSS
< BackHome
Newest questions tagged c# - Stack Overflow

Floating point comparisons [duplicate]

Is it safe to compare floating point variable with constant like double a; ... if ( a == -1.0 ) ...? If floating point value is approximation, the binary representation of variable can be different. (Same question is for

View original source