News for hackers. Stuff that matters.
Re:1/0 = 0 by ggggtez on Friday August 10, 2018 @04:39PM (#17736570)
> But is Pony doing something unsound? Absolutely not. It is totally fine to define 1/0 = 0. Nothing breaks

a=x/N

b=y/N

If a==b, then x==y

No longer true, with this change. Essentially a variety of mathematical properties of numbers in the Real space don't hold when you allow division by 0.

Re:1/0 = 0 by ajanuary on Friday August 10, 2018 @05:36PM (#17736918)
“Nothing breaks” in that it isn’t unsound, in that you can’t use it to prove a falsehood. Not that you can’t use the nice little shortcuts you’re used to.

In practical terms, that _does_ have an impact, because people might use those shortcuts without realising the system they’re operating under doesn’t allow it.

But you picked the wrong quote to make that point under.

Re:1/0 = 0 by lisael on Friday August 10, 2018 @09:00PM (#17737722)
To elaborate on the 'nice little shortcut' you mentioned, here it is:

If a==b and N≠0, then x==y

EDIT: Formatting

Re:1/0 = 0 by ummonk on Friday August 10, 2018 @11:41PM (#17738188)
No, that is not necessary.

"Given an x, y, and N such that x/N == y/N, it is true that x == y".

There is no need to say N != 0 under the ordinary definition of division.

Re:1/0 = 0 by emileokada on Friday August 10, 2018 @05:15PM (#17736799)
This is not true if you say division by 0 is undefined or +inf either. It really is totally fine.
Re:1/0 = 0 by ggggtez on Friday August 10, 2018 @05:23PM (#17736854)
No, you are assuming that 1/0= "undefined" where "undefined" is a magical value. It's not. It literally means 'That operation has no definition, and there is no reasonable result to return'.

Many languages handle this in a practical way by creating a special value "undefined", "NaN", or others that has special properties. But let's be clear that "0" is a normal number in the real number space, as so expectations about properties of real numbers are not going to hold up.

Re:1/0 = 0 by wan23 on Friday August 10, 2018 @05:58PM (#17737023)
When there is no reasonable result to return does it really matter what result is returned? 1 / 0 == 0 is about the same as 1 / 0 == 3. To avoid this just don't do 1 / 0 in your program.
Re:1/0 = 0 by lmm on Friday August 10, 2018 @06:37PM (#17737198)
> 1 / 0 == 0 is about the same as 1 / 0 == 3

Sure, and both are bad.

> To avoid this just don't do 1 / 0 in your program.

If you're going to avoid doing it, better to have it throw an exception if you do it by accident.

Re:1/0 = 0 by LoSboccacc on Friday August 10, 2018 @04:52PM (#17736643)
well, as long as you aren't doing calculus
Re:1/0 = 0 by Y_Y on Friday August 10, 2018 @06:09PM (#17737074)
I think this is the crucial bit. Division by zero in fields means nothing, but if you want to tack on calculus (part of pretending that doubles are reals) then zero is a perfectly good limit for division and it turns out that defining it as anything at all breaks your system.

I didn't like the blogpost, because it's smug, and doesn't even mention this obvious objection.