Don't click here unless you want to be banned.

LSL Wiki : NaN

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawling22.us.archive.org

NaN


NaN stands for Not a Number. NaNs are used to represent the results of operations that are not real numbers or are too big to fit into a float and therefore cannot be adequately represented with a float.

In SL, generating a NaN (by 1.0/0.0) will crash the script.

NaNs in General

NaNs can behave quite differently among the many and varied implementations of computer-based arithmetic. For example, Java has special NaNs to represent positive infinity and negative infinity. NaNs can be represented by any one of a range of float bit patterns. Some implementations apply further meaning to individual NaN values, such as whether an exception should be raised when it is encountered in an operation.

See Wikipedia's NaN entry.

Q:What is the simplest way to make it so NaNs does not get an auto link?
A:Unfortunately, to put double-double quotes ("") around the phrase. I wish there was some better way :-/ -Chris


Operators
Comments [Hide comments/form]
I'm thinking that "Nans in General" and the question should be axed (the wikipedia link can stay), it's not particulary pertinant to know how java works or any other implementation to that matter. C++ supports all 4 profiles of the IEEE Floating point standard that define how exceptions (and NaNs) should be handled and generated, it's up to the user to deside at compile time (the user being LL). The creators of the floating point standards have critisized Java's implementation of floating point arithmetic. Many languages lack support for the different profiles. Ada's exception handling caused the explosion of the EU's Ariane 5 rocket.
-- BlindWanderer (2006-04-14 10:18:28)
Attach a comment to this page: