The number type defines objects that represent numbers and include the IEEE 754 `NaN` values in the set if the implementation is fully ECMA-compliant.

The number range is huge, representing the double precision 64 bit IEEE 754 set of values.

The IEEE 754 standard defines a large number of values that are considered to be not an actual number, and should be represented as `NaN`. Some implementations of IEEE 754 allow you to tell the difference between an overflow error and a divide by zero error. In JavaScript, all of these values are represented by a single `NaN` value and you cannot distinguish between them. The JavaScript `NaN` value is globally defined as a variable.

The `Number` type includes the values positive and negative Infinity and, internally at least, positive and negative zero are represented as two distinct values.

ECMA 262 edition 2 - section - 4.3.19

ECMA 262 edition 2 - section - 8.5

ECMA 262 edition 3 - section - 4.3.20

ECMA 262 edition 3 - section - 8.5

O'Reilly JavaScript Definitive Guide - page - 34

Prev | Home | Next |

Number | Up | Number formats (.) |

JavaScript Programmer's Reference, Cliff WoottonWrox Press (www.wrox.com)Join the Wrox JavaScript forum at p2p.wrox.comPlease report problems to support@wrox.com© 2001 Wrox Press. All Rights Reserved. Terms and conditions. |