Why is this not 0 on 50g or Prime?
|
07-17-2018, 11:12 PM
(This post was last modified: 07-17-2018 11:16 PM by Claudio L..)
Post: #10
|
|||
|
|||
RE: Why is this not 0 on 50g or Prime?
This is quite a subject.
The IEEE standard decided to create the signed zero, so they could map 1/0 to either +Inf or -Inf. That was their solution to avoid the "Undefined". What if you don't want to have signed zero? In reality, 1/0 should be "complex infinity", which is a circle, not a point (all points at an infinite distance from zero, coming from any direction). If you define a complex infinity (Wolfram and any serious math package seem to prefer this), then you don't need a signed zero and problem solved. Or not? How do you even handle a complex infinity? The only operation you can define with it is 1/Inf = 0. Anything else you try will have to be "Undefined", since you have more than a point as a result. Now if you don't want to deal with the concept of complex numbers, then you could take only the real axis, and define "unsigned infinity", which is 2 points at the intersection of the complex infinity circle with the +x and -x real axis. But in practice this is the same as the complex infinity: because it represents 2 points, any operation that's not 1/Inf will be undefined. Then you may need to use the individual "values", +Inf and -Inf that you can actually define a few more operations on. So now we have 4 different types of infinity (complex, unsigned, +Inf and -Inf) to make a real mess of everything. For newRPL I didn't know what to do so I opted for: 0 means 0, there's no signed zero. I implemented the complex infinity but not the unsigned infinity. Then for practical reasons, when the user disables the complex mode flag, 1/0= +Inf. Why? Because VTile said it, take it up on him :-) EDIT: If you disable complex mode, Joe Horn gets his expected result of 0 (granted, there will be an error saying "Infinite result" but you can ignore that), but if you activate complex mode, Valentin gets his more academically correct "Undefined". |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)