It can"t it is in Infinity or -Infinity, since of 0 is same to -0, therefore 1/0 is equal to 1/-0 I need to say, yet why that isn"t? and why the isn"t unknown (what mine calculator says) or NaN.

You are watching: Does 1/0 equal infinity

This is due to the fact that the IEEE 754 specifications define it like that.

There is however a thinking for this: the affinely extended real number device expand the actual numbers through the 2 infinities, which provides some more room because that calculating with limits. So v this expansion a department by zero is no undefined or NaN.

Consider that the complying with is true for positive x:

limx→0(x) = limx→0(-x)

However the adhering to is not true for hopeful x:

limx→0(1/x) = limx→0(1/-x)

Note how the over comparisons with limit notation map to the comparisons girlfriend listed:

0 === -0;// true1/0 === 1/-0;// falseSecondly, a division always maintains the complying with invariance: the result is negative if and only when specifically one of the operands is negative.

Both of this considerations offer some credence as to why in IEEE 754:

1/0 === Infinity1/-0 === -Infinity
share
follow
edited Nov 3 "18 at 9:51
reply Nov 3 "18 in ~ 9:45

trincottrincot
0
include a comment |

many thanks for contributing an answer to ridge Overflow!

But avoid

Asking for help, clarification, or responding to various other answers.Making statements based on opinion; earlier them up with referrals or personal experience.

See more: How Many Bottles Come In A Case Of Wine ? How Many Wine Bottles Are In A Case

Draft saved

authorize up making use of Facebook
submit

### Post as a guest

surname
email Required, but never shown

### Post as a guest

name
email

Required, yet never shown

## Not the answer you're feather for? Browse various other questions tagged javascript math infinity or ask your very own question.

The Overflow Blog
Upcoming occasions
Featured top top Meta
193
Are +0 and also -0 the same?
41
Differentiating +0 and also -0
46
Why does department by zero in IEEE754 standard outcomes in infinite value?
-1
Why is Infinity-Infinity NaN?
connected
1543
just how do you accessibility the matched groups in a JavaScript consistent expression?
5417
What's the difference between using "let" and also "var"?
8006
What walk "use strict" perform in JavaScript, and also what is the reasoning behind it?
2813
storing Objects in HTML5 localStorage
2306
What is JSONP, and also why was it created?
4287
2194
just how to decide as soon as to use Node.js?
1500
exactly how do I completely uninstall Node.js, and reinstall from start (Mac OS X)
1748
how does on facebook disable the browser's incorporated Developer Tools?
hot Network inquiries much more hot questions

question feed

lang-js
ridge Overflow
commodities
firm
ridge Exchange Network
site style / logo design © 2021 stack Exchange Inc; user contributions licensed under cc by-sa. Rev2021.10.22.40552

Stack Overflow works finest with JavaScript permitted