View Full Version : NAN

05-26-2001, 08:14 PM
This is not an OpenGL question.
I have -NAN (not-a-number) as a normal vector. So my normals are pretty random.
I'll try to use spheremap before fixing - it may be looking cool.
I cant find a documentation on NAN.
Which operations can have a NAN as results?
May it be crossproduct on invalid triangle?
How NAN is represented? 0xFFC00000, or there are other numbers?

Thanks in advance for any help.
Nevermind, I've already fixed it.
There was smth with wrong indexing.
BTW spheremap with invalid normals looked pretty dull.

[This message has been edited by RandyU (edited 05-26-2001).]

05-29-2001, 12:34 AM
Weel just to answer anyways... a couple of NAN producers are trig functions errors i.e.
inv sin(x) -> -1>x>1
or division by zero.....


05-29-2001, 03:09 AM
1/100000000 also produces NAN.
AFAIK it's called "denormalized result"