- How I wish I could calculate pi...
- 04 May 2015 09:05:31 am
- Last edited by JWinslow23 on 02 Jun 2015 05:15:20 pm; edited 2 times in total

...on my TI-83+ series of calculators.

Not to worry, though, Jeremy Gibbons and I have a solution for you!

EDIT: We also have a WAY better solution here

Based on the findings in this mathematical paper, here is a TI-BASIC program that calculates one by one the digits of pi, with features such as:

At the current point, this isn't very user friendly. It is set in the program how many digits it computes. This may change soon.

Download links right here. Download every one of those files.

Code is as follows (there are 3 subprograms).

PICALC.8xp

AADJUST.8xp

ACOMPARE.8xp

ADIVIDE.8xp

Not to worry, though, Jeremy Gibbons and I have a solution for you!

EDIT: We also have a WAY better solution here

Based on the findings in this mathematical paper, here is a TI-BASIC program that calculates one by one the digits of pi, with features such as:

- * Arbitrary precision arithmetic simulated through lists

- * An efficient decimal digit streaming algorithm

- * Adequately optimized code (will optimize more, though)

- * Author-verified to calculate more digits than he knows (and I know 100 )

- * insert other stuff here

At the current point, this isn't very user friendly. It is set in the program how many digits it computes. This may change soon.

Download links right here. Download every one of those files.

Code is as follows (there are 3 subprograms).

PICALC.8xp

**Code:**```
{1→ʟQ
```

{180→ʟR

{60→ʟT

2→I

ClrHome

501→D

"CHANGE THE ABOVE NUMBER TO CALCULATE MORE OR LESS DIGITS

"?→Str1

For(J,1,D

Output(1,1,Str1

Output(8,1,J

"ABOVE FOR TESTING

3(3I+1)(3I+2→U

5ʟT→L1

prgmAADJUST

L1→L3

5ʟR→L1

prgmAADJUST

L1→L2

(27I-12)ʟQ→L1

prgmAADJUST

L1+L2→L1

prgmAADJUST

L3→L2

prgmADIVIDE

θ→Y

Str1+sub("0123456789",Y+1,1→Str1

(5I-2)ʟQ→L1

prgmAADJUST

L1→L2

YʟT→L1

prgmAADJUST

L2-L1+ʟR→L1

prgmAADJUST

10UL1→L1

prgmAADJUST

L1→ʟR

10I(2I-1)ʟQ→L1

prgmAADJUST

L1→ʟQ

UʟT→L1

prgmAADJUST

L1→ʟT

I+1→I

End

**Code:**```
DelVar BDelVar C1→A
```

Repeat B or A>dim(L1

C+L1(A→L1(A

If not(Ans

A=dim(L1)+1-sum(int(1/(1+cumSum(abs(seq(L1(Z),Z,dim(L1),1,-1→B

int(10^(7)⁻¹Ans→C

If 0>L1(A

-10^(7)Ans+L1(A→L1(A

10^(7)fPart(10^(7)⁻¹L1(A→L1(A

A+1→A

If C and Ans>dim(L1

Then

0→L1(A

1+dim(ʟQ→dim(ʟQ

Ans→dim(ʟR

Ans→dim(ʟT

Ans→dim(L2

Ans→dim(L3

End

End

**Code:**```
DelVar Gdim(L1→A
```

Repeat G or A<1

(L1(A)>L2(A))-(L1(A)<L2(A→G

A-1→A

End

**Code:**```
DelVar θprgmACOMPARE
```

While G≥0

Output(6,1,"

Output(6,1,θ

"ABOVE FOR TESTING

L1-L2→L1

prgmAADJUST

θ+1→θ

prgmACOMPARE

End