Reply to post: Re: NaN

Good news: Samsung's Tizen no longer worst code ever. Bad news: It's still pretty awful

Kristian Walsh

Re: NaN

Just to state it clearly, the NaN test exemption doesn't apply to the code fragment shown in the article, as the expression shown in that code, "(x>x)", is never true for any type or value of x, NaN or otherwise*

* unless you overload operator>() to do something unrelated to testing for greater magnitude... In whcih case, I will find you and I will do bad things to you.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

SUBSCRIBE TO OUR WEEKLY TECH NEWSLETTER

Biting the hand that feeds IT © 1998–2019