List Commands Library for 50g

10012017, 06:12 PM
Post: #189




RE: List Commands Library for 50g
As has been pointed out by Joe Horn and John Keith in another thread, real arguments (as opposed to exact integers) are usually better performers when passed to builtin commands for processing.
This brings up an important point about many of the ListExt commands. Previously, I had been thinking that numeric output for many of the commands should be tied to the current mode of the calculator: Exact mode would have the commands output exact integers, Approximate would cause reals instead. That seemed to be a coherent approach that respected a user's mode preference. That said, I've also wanted to keep an eye on performance of the library's routines. In that sense, real numbers are almost always going to be the handsdown winners. Just as an example: In exact mode, 5000 LSEQ returns the result as a list of exact integers in about 8.75 seconds. In approximate mode, 5000 LSEQ gives the same result as a list of reals in about 1.29 seconds. Furthermore, subsequent operations you may want to perform using those results will almost always be faster if they are reals. My current thinking is that I should return reals for commands that aren't already specifically designated to return integers (such as NL→I), regardless of mode. If integers are needed, it's easy enough for the user to use the builtin R→I command on the result list. Does anyone have a problem with that? Am I overlooking any significant issues with that approach? 

« Next Oldest  Next Newest »

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