Post Reply 
Musings on the HP-70
12-29-2023, 10:35 AM (This post was last modified: 12-30-2023 08:47 AM by Thomas Klemm.)
Post: #1
Musings on the HP-70

Fibonacci Sequence

Initialisation

DSP 0
CLR
STO M
1

Loop

M+
x<>y


Result

0.
1.
1.
2.
3.
5.
8.
13.
21.
34.


Explanation

\(
\begin{aligned}
x_{0} &= 0 \\
x_{1} &= 1 \\
\\
x_{n+1} &= x_{n} + x_{n-1} \\
\end{aligned}
\)

Python Program

Code:
a, b = 0, 1
for k in range(10):
    print(a)
    a, b = b, a + b

References



Viète's formula for \(\pi\)

Initialisation

DSP 9
0.5
STO K
CLR
STO M
2
ENTER
ENTER
ENTER

Loop

x<>y
M+
K
yx
STO M
÷
×


Result

2.000000000
2.828427125
3.061467459
3.121445152
3.136548491
3.140331157
3.141277251
3.141513801
3.141572940
3.141587725
3.141591422
3.141592346
3.141592577
3.141592634
3.141592649
3.141592652
3.141592653
3.141592654
3.141592654


Explanation

\(
\pi = 2 \cdot \frac{2}{\sqrt{2}} \cdot \frac{2}{\sqrt{2 + \sqrt{2}}} \cdot \frac{2}{\sqrt{2 + \sqrt{2 + \sqrt{2}}}} \cdots
\)

Python Program

Code:
from math import sqrt

p, q = 2, 0
for k in range(20):
    print(f"{p:>.9f}")
    q = sqrt(2 + q)
    p *= 2 / q

References


  • Can you guess the result?
  • Can you come up with other interesting recipes?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Musings on the HP-70 - Thomas Klemm - 12-29-2023 10:35 AM
RE: Musings on the HP-70 - Thomas Klemm - 12-29-2023, 12:53 PM
RE: Musings on the HP-70 - Thomas Klemm - 12-30-2023, 09:02 AM



User(s) browsing this thread: