This documentation is archived and is not being maintained.

Number Data Type

The Number type is stored as an eight-byte, double-precision, floating-point number. It represents a double-precision 64-bit IEEE 754 value.

The Number type can represent numbers as large as 10308 (positive or negative) with an accuracy of about 15 digits, and as small as 10-323. The Number type can also represent NaN (Not a Number), positive and negative infinity, and positive and negative zero.

This type is useful for applications that need large numbers but do not need precise accuracy. If you require very accurate numbers, consider using the Decimal data type.

The corresponding .NET Framework data type is System.Double. The Number type is equivalent to the double type.

Remarks

The properties and methods of the Number data type are the same as the System.Double properties and methods.

JScript also defines a Number object. The Number data type interoperates with Number object. Consequently, a Number object can call the methods and properties of the Number data type, and a Number data type can call the methods and properties of the Number object. For additional information, see Number Object Properties and Methods. Furthermore, Number objects are accepted by functions that take Number data types, and vice versa.

The Number data type should be used instead of the Number object in most circumstances.

Properties and Methods

Double Members

Requirements

Version .NET

See Also

Data Types | Data Type Summary | double Data Type | decimal Data Type | Number Object | Double Structure

Show: