Did you know? When you compare 0 with NaN (Not a Number) in labview, the result is a broken shooter.
please don’t try it at home (i’m assuming that your home is the lab.)
Just as long as you’re not dividing by zero. Then your robot collapses into a pocket universe to preserve reality.
we used acos(1.04)… same affect basically…
So, 229 uses a special version of labview?
Of course not, they’re in a universe all their own.
This is most likely the result of the oxygen in your robot bag running out… this is why student programmers should not be bagged with the robot.
Equally fun fact:
When you compare anything and one of the elements is NaN, the result is false. Nan > 0 is false and Nan < 0 is false and Nan == 0 is false.
And it isn’t just LV. This is what IEEE 754 says to do. And it makes sense, but at the same time will surprise you at times when you least expect it – possibly causing shooters to misbehave, wormholes to form, etc.
Greg McKaskle
If you do decide to experiment with exploiting wormholes, remember that game pieces from past or future games should not be allowed to enter the playing field. There’s no rule against it yet, but R01 is always in force.
Corollary: The smart programmer uses this fact to some advantage. If there’s a possibility of you getting a NaN as result, then make sure your false case is what you’d want to run if you’re processing a NaN. Makes things a lot more reliable.
That’s a mistake you only have to make twice…
In LabVIEW there’s a block to check if isNaN. If I’d known then what I know now.
Apparently this is how IsNaN is implemented in C#: http://stackoverflow.com/a/1145462.