A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/Infinity below:

Infinity ยท WebPlatform Docs

Infinity Summary

A number that is larger than the largest floating point number.

Syntax
Infinity
Return Value

Returns an initial value of Number.POSITIVE_INFINITY.

Examples

Divisions by zero will give you Infinity. Divisions by negative zero will give you -Infinity.

42 / 0; 
42 / 0; 

Everything beyond Infinity remains Infinity

Infinity * Infinity; 

If an arithmetic overflow occurs, Infinity is also returned

Math.pow(2, 1024); 
Remarks

The Infinity constant is a member of the Global object, and is made available when the scripting engine is initialized.

Notes Negative Infinity

Negative Infinity (-Infinity) is smaller than the smallest floating point number and returns a value of Number.NEGATIVE_INFINITY.

Mathematical

This value behaves mathematically like infinity; for example, anything multiplied by Infinity is Infinity, and anything divided by Infinity is 0.

Infinity subtracted by Infinity will return NaN

isFinite()

The isFinite() function can be used to check if a given value is a finite number

See also Other articles Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4