RosettaCodeData/Task/Arithmetic-geometric-mean/TI-83-BASIC/arithmetic-geometric-mean.basic

7 lines
77 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
1→A:1/sqrt(2)→G
While abs(A-G)>e-15
(A+G)/2→B
sqrt(AG)→G:B→A
End
A