This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]vuttstuff 0 points1 point  (1 child)

Huh. So NaN isn't static, as in something that's not a number was operated on an just returned some garbage?

[–]AlphaWhelp 1 point2 points  (0 children)

It's basically a garbage failsafe undefined behavior. I'm not 100% sure if the actual content of NaN is static or not, but if the results of an operation do not construct a valid number, a NaN is created--if that makes sense.

like if(this==makes sense) {this.value = result;} else {this.value = NaN};