Posts: 3,229
Threads: 42
Joined: Jul 2006
Very nice!
Not having a 12C to hand, I converted this for the 34S:
01: LBL A
02: 10[^x]
03: STO 00
04: x[^2]
05: RCL L
06: RCL+ X
07: INC X
08: x[<->] Y
09: RCL+ X
10: +
11: 1/x
12: STO 01
13: LBL 00
14: RCL 00
15: 3
16: +/-
17: y[^x]
18: STO+ 01
19: DSZ 00
20: GTO 00
21: RCL 01
22: RTN
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.
- Pauli
Posts: 2,761
Threads: 100
Joined: Jul 2005
While we're at it, here's another one for another constant:
001- 1 019- CHS
002- 0 020- STO+ 0
003- x<>y 021- STO* 2
004- y^x 022- RCL 0
005- STO 0 023- 2
006- ENTER 024- *
007- * 025- +
008- 8 026- ENTER
009- * 027- *
010- 6 028- 1/x
011- + 029- RCL 2
012- 1/x 030- *
013- STO 1 031- STO+ 1
014- 1 032- RCL 0
015- STO+ 0 033- g x=0
016- STO+ 1 034- g GTO 36
017- STO 2 035- g GTO 18
018- 1 036- RCL 1
037- g GTO 00
Checking the archives, I found an old mini-challenge 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/cgi-sys/cgiwrap/hpmuseum/archv016.cgi?read=95861
I've come up with a slightly faster series. I've started to implement it on the HP-15C LE, but the initialization alone takes up 37 steps. If I manage to optimize it a bit, I'll present it later.