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

7 lines
111 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04: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