RosettaCodeData/Task/Arithmetic-geometric-mean/Oforth/arithmetic-geometric-mean-1.fth
2023-07-01 13:44:08 -04:00

2 lines
73 B
Forth

: agm \ a b -- m
while( 2dup <> ) [ 2dup + 2 / -rot * sqrt ] drop ;