News for hackers. Stuff that matters.
Re:1/0 = 0 by halflings on Friday August 10, 2018 @04:46PM (#17736603)
Unlike what the author says, this is the total opposite to a practical/pragmatic solution.

He does not prove that this is a useful representation, only that given his own axioms, this can be considered mathematically correct.

Very practical issues with 1/0 == 0:

- This result is counter-intuitive, took building a custom fields and responding to the incredulity of all. - The main reason this is counter-intuitive is not mentionned in the post: division is no longer monotonous.

1/0.5 = 2 1/0.25 = 4 1/0.0001 = 10000 1/0 = 0

This is calling for an Ariane 5-type crash because an underflow error caused a value to suddenly fall from 10e6 to 0.

Re:1/0 = 0 by klodolph on Friday August 10, 2018 @05:21PM (#17736841)
> This is calling for an Ariane 5-type crash because an underflow error caused a value to suddenly fall from 10e6 to 0.

That’s the opposite of what happened. A value overflowed, which triggered an exception, which caused a module to emit diagnostic information, which was misinterpreted by other systems as flight data. Interestingly, the value which overflowed was part of a system which was only used until LT+7, which had aleady passed…

In short, if the overflow had simply saturated or wrapped around to 0 or given some other garbage result, the Ariane would have not crashed.

Re:1/0 = 0 by stringer on Friday August 10, 2018 @04:53PM (#17736655)
Were are speaking of integers here not FP numbers.
Re:1/0 = 0 by curice on Friday August 10, 2018 @05:01PM (#17736708)
Not to be pedantic, but one of the author's own examples involves pi inverse, so I think discussing FP numbers is valid.
Re:1/0 = 0 by stringer on Friday August 10, 2018 @05:14PM (#17736789)
Yes I know, but in the context of Pony, 1/0==0 only applies to integers, not FP numbers. The article doesn't make it clear.
Re:1/0 = 0 by spooneybarger on Friday August 10, 2018 @05:14PM (#17736792)
floating point numbers in Pony follow the standard and return Infinity for division by zero. integer division by zero is undefined behavior and something each programming language has to decide how to handle.
Re:1/0 = 0 by halflings on Friday August 10, 2018 @08:12PM (#17737568)
The article mentions floating point numbers as well, and the same applies to integers anyway. Only used FP numbers for emphasis.
Re:1/0 = 0 by FlipperBucket on Friday August 10, 2018 @05:08PM (#17736743)
I think this is calling for a Pony programmer working with floating point to know how their own basic operators function. Wrapping division in a function that checks for zero will give you the proper result you would like to return.
Re:1/0 = 0 by lmm on Friday August 10, 2018 @05:21PM (#17736838)
Ah yes, the wobbly-step school of language design.