Alright, time for me to speak out on this (I did

a project with the same title a long time ago).

One, don't calculate pi. Calculate

tau.

Two, what I did to calculate pi was I used a spigot algorithm (more properly called a "streaming algorithm" to give digits one by one through running it successive times. If you want, I can give a writeup of it, in pseudo-code form, but you'll have to ask (I don't wanna do it on my own

).

Three, even if you have the right algorithm, it's not that simple. In fact, it's not that simple on ANY computer implementation. Especially with the calculator's limitations, if you wanna go any farther than 14 digits (which is how many the calculator stores internally for all numbers), you'll need lists upon lists upon lists to keep track of much of the mathematics. The algorithm I used, luckily, uses no decimals, and only uses arbitrary-precision integers, so even that math was simplified by a huge factor, but just know that this will be a difficult undertaking.

Also, I'd just like to point out my favorite (deterministic) way to calculate tau thus far:

**Code:** ```
2→A
```

Ans⁻¹→B

While 1

A+Ans⁻¹→A

B+Ans⁻¹→B

Disp A/B

End

I'll leave adapting this for pi as an exercise to the reader