03-16-2014, 02:17 AM

1) Do only item (b) of the following exercise, taken from the book Systematic Programming, An Introduction, by Niklaus Wirth (but feel free to do them all, if you wish :-)

It should take under one minute to sum all 10 thousand terms on an HP-15C LE (you might not try this on the classic HP-15C as it would take around 2 and a half hours).

I don't remember what I used in 1984, but the pencil annotation in my printed copy of the book matches the HP-15C result, at least for item (b) (I haven't checked the other items).

2) As you can see, this series for ln(2) is very slowly convergent (10^4 terms yield only 3 significant digits). Modify your program so that it can compute the constant under one minute on a classic HP-15C (or HP-11C, 12C, 41C and other 10 or 12-digit RPN calculator). Tip: try to find an empirical relationship between the number of terms and the error.

Only as a reference, my HP-15C programs for items 1) and 2) are 15 and 24 steps long, respectively. Remember, this is an exercise, not a challenge. All solutions are welcome, not only the shorter and faster ones.

Have fun!

It should take under one minute to sum all 10 thousand terms on an HP-15C LE (you might not try this on the classic HP-15C as it would take around 2 and a half hours).

I don't remember what I used in 1984, but the pencil annotation in my printed copy of the book matches the HP-15C result, at least for item (b) (I haven't checked the other items).

2) As you can see, this series for ln(2) is very slowly convergent (10^4 terms yield only 3 significant digits). Modify your program so that it can compute the constant under one minute on a classic HP-15C (or HP-11C, 12C, 41C and other 10 or 12-digit RPN calculator). Tip: try to find an empirical relationship between the number of terms and the error.

Only as a reference, my HP-15C programs for items 1) and 2) are 15 and 24 steps long, respectively. Remember, this is an exercise, not a challenge. All solutions are welcome, not only the shorter and faster ones.

Have fun!