Quick References
ADO
ASP
CSS2
HTML
JavaScript
Jet SQL
VBScript
WML
WMLScript
WSH
XHTML
XML DOM
XSLT
Features
Knowledge Base
Tutorials
Partners
ZVON.ORG
XML
Planet Source Code
VisualBuilder
Web Design
Your HTML Source
XML/XSLT Forums
ASPAlliance
Scripts
Programmers Heaven
Tek-Tips Forums
Developer Fusion
Code Project
All Primitive Values
isFinite Function
Number Object
Math Object
Primitive Value: Infinity
Infinity
In ECMAScript,
Infinity
is classified as a primitive value.
Infinity
is a numeric value that represents positive infinity. It is displayed, or printed out, when a very large positive number exceeds the upper limit of the floating point numbers type which is 1.7976931348623157E+10
308
.
-Infinity
is a numeric value that represents negative infinity. It is displayed, or printed out, when a very large negative number exceeds the lower limit of the floating point numbers type which is -1.7976931348623157E+10
308
.
Also see
number.NEGATIVE_INFINITY and number.POSITIVE_INFINITY
.
Code:
BigPosNum = 1.5E+339 * 2.4E+317
document.write("BigPosNum = " + BigPosNum)
Output:
BigNum = Infinity
Code:
BigNegNum = -1.5E+333
document.write("BigNegNum = " + BigNegNum)
Output:
BigNegNum = -Infinity
NOTE:
In JavaScript, all numbers, including integers, are treated as floating point numbers.
Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information