Post Reply 
newRPL: [UPDATED April 27-2017] Firmware for testing available for download
03-02-2017, 05:08 PM
Post: #590
RE: newRPL: [UPDATED February 21-2017] Firmware for testing available for download
(03-01-2017 09:01 PM)Han Wrote:  Would aliases help? Libraries on the HP48 series allowed a command to have several names. At the sake of having extra command names, it would allow us to have both SD<command> and <command>SD

It's also allowed in newRPL, all you have to do is declare the commands independently, then make it fall to the same case XXX: statement for execution. It can quickly pollute the name space, as some people pointed out when I proposed to have SIN, SINR, SIND, SING for the different angle formats. The idea didn't fly back then and I think it wouldn't fly now.
I can try putting SD at the end to see how it looks on the menu, there will be many cases where it will still show the same name (SDOPENRD, SDOPENWR, SDOPENAPP, SDOPENMOD will all read "OPEN" in the menu!). But using less letters for the commands makes it more cryptic to read, as-is at least when you read a program you can guess that SDOPENWR is opening a file for writing on the SD card.

(03-01-2017 09:01 PM)Han Wrote:  Ideally these commands would work on symbolic matrices too once all is said and done. For now I'll put a check for element types (complex vs real vs other) to be used during argument checking.

Yes, I think that's the right approach, as you will probably need different algorithms for numeric and symbolic matrices. For example, I implemented the Bareiss inversion procedure because it's well suited for symbolics, but it's not efficient for numeric matrices and I have no idea how it will behave on ill conditioned matrices, so perhaps we need to add a more adequate numeric algorithm for purely numeric matrices.

Also, you won't be able to read numbers and operate on them directly, you'll always have to push them to the stack and call the overloaded operator. For instance, a complex number can be in rect or polar, if polar it can be in any angle system. This is all taken care by the operator, you'd have to reproduce all that if you want to have a quicker algorithm. In other words, you'll be writing an RPL algorithm, just coded in C.

When you implement the checks, don't go over each item in the matrix, get a pointer after the matrix hash table and check the objects as a list. Much faster since repeated objects are not stored.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: newRPL: [UPDATED February 21-2017] Firmware for testing available for download - Claudio L. - 03-02-2017 05:08 PM

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