RosettaCodeData/Task/Arithmetic-geometric-mean/ZX-Spectrum-Basic/arithmetic-geometric-mean.basic
2023-07-01 13:44:08 -04:00

6 lines
111 B
Text

10 LET a=1: LET g=1/SQR 2
20 LET ta=a
30 LET a=(a+g)/2
40 LET g=SQR (ta*g)
50 IF a<ta THEN GO TO 20
60 PRINT a