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
boost this answer
edited Nov 3 "18 at 9:51
reply Nov 3 "18 in ~ 9:45


233k2828 gold badges190190 silver badges228228 bronze title
include a comment |

your Answer

many thanks for contributing an answer to ridge Overflow!

Please be certain to answer the question. Administer details and share your research!

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.

To learn more, watch our tips on writing an excellent answers.

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

Draft saved
Draft discarded

Sign up or log in

sign up using Google
authorize up making use of Facebook
sign up making use of Email and also Password

Post as a guest

email Required, but never shown

Post as a guest


Required, yet never shown

article Your price Discard

By click “Post her Answer”, friend agree come our regards to service, privacy policy and also cookie policy

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
Are +0 and also -0 the same?
Differentiating +0 and also -0
Why does department by zero in IEEE754 standard outcomes in infinite value?
Why is Infinity-Infinity NaN?
just how do you accessibility the matched groups in a JavaScript consistent expression?
What's the difference between using "let" and also "var"?
What walk "use strict" perform in JavaScript, and also what is the reasoning behind it?
storing Objects in HTML5 localStorage
What is JSONP, and also why was it created?
Why go Google prepend while(1); to your JSON responses?
just how to decide as soon as to use Node.js?
exactly how do I completely uninstall Node.js, and reinstall from start (Mac OS X)
how does on facebook disable the browser's incorporated Developer Tools?
hot Network inquiries much more hot questions

question feed
subscribe to RSS
question feed To i ordered it to this RSS feed, copy and also paste this URL right into your RSS reader.


ridge Overflow
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

your privacy

By click “Accept every cookies”, friend agree stack Exchange deserve to store cookie on your maker and disclose information in accordance v our Cookie Policy.