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

7 lines
111 B
Text
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
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