Any way to "translate" this pi-computing program from TI-BASIC to JavaScript?
Could you translate this program to JavaScript? (I'm simplifying it slightly so it's easier to translate)
:0→P
:For(X,1,1E6
:P+X^-2→P
:End
:\sqrt\(6P→P
:Disp P
Or, If you want one that displays pi while you generate it:
:0→P
:For(X,1,1E6
:P+X^-2→P
:\sqrt\(6P→θ
:Output(1,1,θ
:End
If any of you know JavaScript and want to "translate" it— Go ahead!
:D
Unfold
Any way to "translate" this pi-computing program from TI-BASIC to JavaScript? by
mathsman502, 10 Dec 2019 15:41