RosettaCodeData/Task/Arithmetic-geometric-mean/ZX-Spectrum-Basic/arithmetic-geometric-mean.b...

7 lines
111 B
Plaintext

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