In this example, when you say “divide it zero times”, what you are really saying is “divide it by 2, zero times”.
dohpaz42@lemmy.world 11 months ago
If I have one whole pizza, and I divide it zero times, then wouldn’t I still have one whole pizza? I.e., shouldn’t 1 / 0 = 1
?
sleepy555@lemmy.world 11 months ago
WhoresonWells@lemmy.basedcount.com 11 months ago
So 2^0^=1.
BradleyUffner@lemmy.world 11 months ago
That’s not what division is though. Division is splitting something into X equal parts. If you split a pizza into 0 equal parts, how large is each part?
dohpaz42@lemmy.world 11 months ago
I’m not super great at math, and the concept of division by zero has been somewhat confusing for me. It’s also been a bane to my existence as a programmer. To me, in both scenarios, it makes sense to get back the original number, because 0 equal parts and zero inches wide leaves the original pizza untouched. But I also accept that there are much smarter folks out there who know better than I do, so
undefined
orNaN
is what it is.Thanks though for explaining it!
sosodev@lemmy.world 11 months ago
The easiest way to explain divide by zero is to think of division as repeated subtraction. For a simple example of 4 / 2 we know that we would have to subtract 2 from 4 twice to reduce it to 0.
When we divide by zero we’re functionally asking how many times can we remove zero from the numerator until it is reduced to zero. We typically state the answer as infinity or NaN because we know that we could do this operation indefinitely without the numerator reducing to 0.
hamsterkill@lemmy.sdf.org 11 months ago
To illustrate why it’s not the original number, ask yourself this question — “How many times can you slice a pizza such that each slice is 0 inches wide?”
Yes, you’re leaving the pizza untouched with each slice, so you will never stop slicing.