HP12C program  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: HP12C program (/thread212237.html) 
HP12C program  Gerson W. Barbosa  02212012
Given the proper argument this small HP12C program will give a meaningful result in about 2 minutes on the classic HP12C (under a couple of seconds on the HP12C+).
Re: HP12C program  Paul Dale  02212012 Very nice! Not having a 12C to hand, I converted this for the 34S:
01: LBL A However, there is an alternative WP 34S program that produces the same limit using four steps including the LBL at the start and the RTN at the end  so two steps of working code.
Re: HP12C program  Paul Dale  02212012 Drat, missed some optimisation in the above code. Change line 18 to + and delete lines 21 and 12.
Re: HP12C program  Gerson W. Barbosa  02212012 Quote: Actually, I've tested my results upon the WP 34S function :)
Gerson.
Re: HP12C program  Gerson W. Barbosa  02212012 I thought of including "optimization of the code is left as an exercise to the reader", but then I realized figuring out what the program did was good exercise enough. That was my first attempt after I noticed it this afternoon. Without the trick, about 50k terms would have to be computed in order to get the same result.
Gerson.
Re: HP12C program  Gerson W. Barbosa  02222012 While we're at it, here's another one for another constant:
001 1 019 CHS Checking the archives, I found an old minichallenge of Valentin's which is worth mentioning. Crawl's program in Message #52 appears to explore the same idea. I certainly read the thread at the time, but I'd completely forgotten about his particular program. It's worth reading Valentin's original solutions and other therein: http://www.hpmuseum.org/cgisys/cgiwrap/hpmuseum/archv016.cgi?read=95861
I've come up with a slightly faster series. I've started to implement it on the HP15C LE, but the initialization alone takes up 37 steps. If I manage to optimize it a bit, I'll present it later.
