>NaN ...">

Why is Infinity / Infinity not 1?

If

Infinity === Infinity >> true 

and

 typeOf Infinity >> "number" 

why

 Infinity / Infinity >>NaN 

not 1?

+6
source share
4 answers

Beware of any assumptions you make about the arithmetic behavior of infinity.

If & infin; / & infin; = 1, then 1 x & infin; = & infin ;. Gradually, since 2 x & infin; = & infin ;, it should also be that & infin; / & infin; = 2.

Since he appeared in a discussion of another answer, I would like to point out that the equation is 2 × & infin; = & infin; does not mean that there are many infinities. All countably infinite sets have the same cardinality. Ie, the set of integers has the same power as the set of odd numbers, although the second set does not contain half the elements from the first set. (OTOH, there are other kinds of “infinity,” such as the power of many real numbers, but doubling the countable infinity does not lead to one of them, as well as squaring it, for that matter.)

+11
source

Since the specification says so:

The division of infinity into infinity leads to NaN .

I'm not a mathematician , but even from this point of view, having 1 , as a result, it makes no sense. Infinity can be different and only because they are equal in JavaScript does not justify their relative uniformity in all other cases (or allows the return of div 1 ). (editing: as I said, m is not a mathematician;)).

+5
source

He is recognizable from Calculus alone! This is an indefinite form!

+1
source

The result is mathematically undefined. This has nothing to do with javascript. See the following explanation .

+1
source

Source: https://habr.com/ru/post/897378/


All Articles