View Single Post
  #11   Spotlight this post!  
Unread 14-02-2011, 23:11
tmiddlet tmiddlet is offline
Registered User
FRC #2083
 
Join Date: Feb 2011
Location: Colorado
Posts: 1
tmiddlet is an unknown quantity at this point
Re: Testing for infinity

We were doing this exact same thing!
I know how we tested for NaN, but we didn't use infinity.
If a number is equal to NaN, it is not equal to itself

double nan = 1/0*8; //NaN
if (nan != nan) {
// nan is equal to NaN
}
Reply With Quote