(50g) Simple summation program that returns large integers
|
03-22-2017, 03:44 PM
(This post was last modified: 03-22-2017 03:47 PM by pier4r.)
Post: #1
|
|||
|
|||
(50g) Simple summation program that returns large integers
So, In my little explorations reusing the hp 50g after years, I found out that the \GS built in function (sigma) of the 50g works on real or complex numbers, returning those two types of numbers.
After the suggestion of John Keit, I decided to create a program that simulate the summation function to return all the digits if the computation involves only integers and produces an integer. So I wrote the following complement of the built in summation function (more here on assembla.com git repo). Code:
I suppose that such a complement can be expanded in a proper function, like handling errors, better flag handling, handling rational numbers that are still composed by integers, double summations, multiple index, index that can step more than +1 and so on. As it is, the program is pretty rough but may help (it helped me), if someone wants to expand the idea, feel free to do it. Shared knowledge is the best. I'm also pretty sure that someone worked on programs like this already, because the amount of amazing math libraries existing for saturn compatible calculators is incredible, just I did not find anything about this topic with the search string "site:http://www.hpmuseum.org/forum summation OR sum 50g". So if someone knows already existing programs that are better than the one I made, please share them with a reply to this thread! Side note on this section: would be nice to organize a naming convention for the titles, since I was not sure about it. I just followed the most common pattern. Wikis are great, Contribute :) |
|||
03-23-2017, 10:01 AM
Post: #2
|
|||
|
|||
RE: (50g) Simple summation program that returns large integers
Update. The built in summation function works fine with proper flags cleared (as they need to be cleared also in my program). See here.
Wikis are great, Contribute :) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)