Post Reply 
newRPL: The complexity of complex mode
08-25-2016, 02:39 AM
Post: #8
RE: newRPL: The complexity of complex mode
(08-24-2016 10:32 AM)Nigel (UK) Wrote:  I see what you mean about my previous post! I got a little carried away. Because operators like "+" and "x" are already overloaded, I assumed that adding a new behaviour for a new object type would not be a problem. The simplifications such as \((3,2\times\infty)\) becoming \(\infty\angle{\pi\over2}\) would be handled by whatever code is called to evaluate this new object type.
It's not a problem, just a lot of work. By the way, there's no new object type. The infinity symbol is a special real number object, same as NaN, not a new type. Along the same lines, undirected infinity can be generated by a division by zero between two reals when complex mode is on, so it's also a special real object. The reason is simple: The arbitrary precision library is a separate module, that handles numbers without knowing anything about objects, or any RPL concepts, and should be able to return those specials within the same data structures.
Along the same line of thinking, complex directed infinity is a complex number object, so it is handled by the same library doing all complex operations.

(08-24-2016 10:32 AM)Nigel (UK) Wrote:  However, I believe that all operations on directed infinities could be disallowed without loss. Those few operators that need them as input (e.g., limits and integrals) could look for them explicitly and provide their own means of dealing with them. Allowing only the angle notation (i.e., \(\infty\angle {\pi\over2}\) and not \((0,\infty)\)) would reduce the number of cases to consider and would not be a problem for the user. Perhaps it would be nice to allow \(\infty, \;-\infty, \;i\infty, \;-i\infty\) as equivalent notation for \(\infty\angle0,\;\infty\angle\pi,\;\infty\angle{\pi\over2},\;\infty\angle{-}{\pi\over2}\).

Nigel (UK)

The thing is, the "classic" RPL environment always had a flag to disable the error message on infinite results. Using this flag together with complex mode means we are forced to produce a result, and I'd rather give the correct result than gibberish. Based on this I'm starting to convince myself there's no way to avoid this mess.
Regarding notation, the infinity symbol means real infinity (+/-). If the operations are correctly defined, when you use \( \;i\infty \) in a symbolic expression and run ->NUM you'll get the proper complex result, as i = (0,1) and \(\infty\) = (\(\infty\angle0\) ).
A multiplication properly defined would add the arguments 0 + \({\pi\over2}\) and return ( \(\infty\angle{\pi\over2}\) ).
Then depending on the flag, this would throw an error "infinite result" or allow the program to keep running.
It seems the only way to be able to return that result is to have properly defined each and every operation on all the different infinities, and between infinities and normal numbers.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL: The complexity of complex mode - Claudio L. - 08-25-2016 02:39 AM



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