Post Reply 
newRPL: [UPDATED April 27-2017] Firmware for testing available for download
06-03-2016, 09:22 PM
Post: #286
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download
(06-03-2016 02:17 PM)Claudio L. Wrote:  So much food for thought that I'm going to choke!

I hope not, I'd hate to see that! Wink

(06-03-2016 02:17 PM)Claudio L. Wrote:  Let's see...
If infinity is an object, what would the math library return when trying to divide 1 by 0 (which are reals)? Right now it simply marks the result with an infinity flag, because the only thing the decimal library can return is a real number. Object infinity would have to be handled 100% by higher level code (RPL library) as opposed to the decimal math library, including all special cases that could cause an infinity result, like TAN(∡90°). Right now in this example, the TAN function returns a real infinity, but the TAN code itself doesn't know anything about objects yet, it only deals with real numbers.
So having a separate object might not help the developer of newRPL libraries that much, as every new command would need to handle the various new special objects.

And this settles the question, I guess... Clearly I hadn't reflected enough about how RPL functions interact with decimal library.

(06-03-2016 02:17 PM)Claudio L. Wrote:  Yes, you could argue that doesn't make sense for complex infinity to be a real number... but it makes sense for a decimal library to be able to output complex infinity as a result of a real operation.
So in the end:
∞ (with or without the sign) = real infinity.
(∞, ∡0.3r) = Complex infinity (directed)
∞̅ = Undirected complex infinity (a real number w/some special flags).

This should be able to accomplish most of what you discussed without fundamentally changing existing code.

Sounds good. At the end the objective is to represent unambiguously the possible outcomes of infinity-related calculations.

(06-03-2016 02:17 PM)Claudio L. Wrote:  Undirected infinity should not be allowed inside a complex number though: (∞̅,0), (0,∞̅), (∞̅,∞̅) should be invalid.

Definitely not. BTW your previous remark about division by zero reminded me a question I wanted to ask you: will NewRPL have a "complex mode" like the original firmware or will the functions seamlessly return results in the appropriate domain?

I'm asking because some calculations (e.g. SQRT(-1)) return complex results if possible while others (e.g. LN(-1)) yield "Argument Outside Domain" error.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: newRPL: [UPDATED May-06-16] Firmware for testing available for download - JoJo1973 - 06-03-2016 09:22 PM

User(s) browsing this thread: 3 Guest(s)