int isnan(float x)
Returns 1 if the given value is not a number.
Returns 0 if it is a normal number or infinite.
NAN, or Not A Number, is a special value floating point numbers can be set to to signal something has gone wrong in the computation. They are carried forward by all further operations (adding or multiplying with them produces more NANs) and tend to cause problems with downstream operations.
In traditional programming, these are generated by 0/0 or
sqrt(-1), but in VEX
most such operations are guarded so normally VEX will not produce NANs.