Some people say "oh, that's easy, 1/0 is +Infinity". So the real fun is at 0/0. The limit of x/y as x and y go to zero depends on which path across the xy plane you take towards the singularity. Along one approach, the limit is 0, along another approach the limit diverges to infinity, along yet another the limit is 17. I'm not kidding! Go to https://www.geogebra.org/3d and enter "x/y" and spin the graph around. The "…
1/0 = 0
461–470 of 593 posts
Re: 1/0 = 0
#462> But is Pony doing something unsound? Absolutely not. It is totally fine to define 1/0 = 0. Nothing breaks and you can’t prove something false. Everybody who was making fun of Pony programmers for being ‘bad at math’ doesn’t actually understand the math behind it. This is playing semantic games. A whole lot does break: / no longer has its usual properties, and if you use those usual properties you can certainly prov…
What usual properties does 1 / 0 = 0 break?
Re: 1/0 = 0
#463Earlier quoted context omitted.
My comment from when this came up on Reddit, slightly edited for context: `/`-by-0 is just an operation and it tautologically has the semantics assigned to it. The question is whether the specific behaviour will cause bugs, and on glance that doesn't sound like it would be the case. Principally, division is normally (best guess) used in cases where the divisor obviously cannot be zero; cases like division by constant…
An example well-defined use case is if you want to compute a harmonic mean, e.g. x = 2/(1/a +1/b) This is a form of average where you are giving increased importance to the smaller number. It frequently pops up in science/engineering, e.g. in hydrology when you are computing flow of water underground. In this case, it's "obvious" that when e.g. a is zero, you want 1/a to be zero so you simply return b. There's typica…
b obviously isn't what you want from this harmonic mean when a is 0. And in any case x will be 2b if 1/a is 0, not b.
Re: 1/0 = 0
#464> We’ve now established that if we choose some constant C, then defining division such that x/0 = C does not lead to any inconsistencies. No, you haven't. You've merely failed to locate any. You've said "I'm not going to prove that this works. I'm going to assume that it does and act as if it did, and place the burden on you to prove otherwise."
Re: 1/0 = 0
#465My problem with "1/0 = 0" is that it's essentially masking what's almost always a bug in your program. If you have a program that's performing divide-by-zeroes, that's almost surely something you did not intend for. It's a corner case that you failed to anticipate and plan for. And because you didn't plan for it, whatever result you get for 1/0 is almost surely a result that you wouldn't want to have returned to the…
It happens in scientific computing with zero bounded signals fairly regularly. Sometimes values hover close enough to zero that the computation results in a/0. It's not desired but the only alternative is a guard that invariably adds a performance penalty. There are other ways around it, such as normalization, but they're not trivial depending on the problem and can actually add other sources of bugs/errors. I unders…
Re: 1/0 = 0
#466Earlier quoted context omitted.
Take the limit as x goes to 0 of (17*x)/(x). Both numerator and denominator go to 0, so this is a representation of 0/0. The limit is then equal to 17.
This just means that 0/0 = 1. It doesn’t mean that any number / 0 tends to 17.
Re: 1/0 = 0
#467Some people say "oh, that's easy, 1/0 is +Infinity". So the real fun is at 0/0. The limit of x/y as x and y go to zero depends on which path across the xy plane you take towards the singularity. Along one approach, the limit is 0, along another approach the limit diverges to infinity, along yet another the limit is 17. I'm not kidding! Go to https://www.geogebra.org/3d and enter "x/y" and spin the graph around. The "…
I like your point here. I think 1/0 = Infinity+ is a satisfying expression. Its a clear concept which can be visualized in a simple graph. I think 0/0 is a different concept than 1/0. It's a different expression. 0/0 doesn't explicitly express a particular "path" on the graph. We can call it (0/0) different names if we want. They can say 0/0 = "undefined". I am currently satisfied with 0/0 simply equals to 0/0, or si…
Not for integers.
Re: 1/0 = 0
#468Earlier quoted context omitted.
x=170, y=10 x=17, y=1 x=1.7, y=0.1 x=0.17, y=0.01 The answer keeps being 17, even as x and y both get vanishingly close to zero. I encourage you to play around with a 3D graphing calculator and see all the different paths you can take along that surface to reach the singularity. They all "reach" it at different heights.
you are explaining why 0 / 0 can approach 17, this is much less controversial, and is often considered the bottom element...
Re: 1/0 = 0
#469Earlier quoted context omitted.
but with floating point units, 1.0/0.0 is infinity.
That's not correct mathematically though. You can't divide something 0 times and get any number. Adding zero + zero + zero infinite times does not equal 1.
Yes, certainly it is.
"You can't divide something 0 times and get any number. Adding zero + zero + zero infinite times does not equal 1."
The discussion is about mathematics, not elementary school arithmetic.
Re: 1/0 = 0
#470Earlier quoted context omitted.
Maybe all this talk about fields is a distraction? Integer arithmetic isn't a field anyway. Other than 1 and -1, no integer has a multiplicative inverse that's an integer. Integer division just isn't the same operation as division on rationals or reals. The same laws don't apply. (For floats, division by zero can return Inf, -Inf or NaN and there's no reason to define it differently.) It looks like the theorem-provin…
Yes! Exactly, it's a distraction. There are reasonable, well-intentioned reasons to argue that division by 0 should be an acceptable operation in a computational setting. Computational settings need not admit all the rigor of theoretical math. I wish the author had not tried to involve field theory and programming like this because it detracts from the point :)