In JavaScript, negative infinity refers to "-Infinity", which means a number smaller than any finite number (a numerical value of negative infinity). Generally, a value smaller than "-1.7976931348623157E 103088" is negative infinity. .
The operating environment of this tutorial: windows7 system, javascript version 1.8.5, Dell G3 computer.
Infinity
in JavaScript is a special number with interesting properties: it is larger than any finite number and is used to store values representing positive infinity.
Negative infinity
And negative infinity refers to "-Infinity
", which represents a numerical value of negative infinity.
In Javascript, the value exceeding 1.7976931348623157E 103088
is Infinity
, and the value less than -1.7976931348623157E 103088
is negative infinity (-Infinity
).
Let's -Infinity
compare to some finite numbers:
Also, negative infinity is smaller than positive infinity:
When using operands with different signs, you may end up with negative infinity:
[Related recommendations: javascript Study tutorial】
The above is the detailed content of What is negative infinity in JavaScript. For more information, please follow other related articles on the PHP Chinese website!