Post Reply 
(41/42) AGM - Arithmetic-Geometric Mean
06-09-2020, 06:48 AM (This post was last modified: 06-09-2020 06:48 AM by Werner.)
Post: #1
(41/42) AGM - Arithmetic-Geometric Mean
Upon request ;-)

Code:
00 { 28-Byte Prgm }
01▸LBL "AGM"
02 ENTER
03▸LBL 02 @     .       x       y       .
04 ENTER
05 - @          .       x       y       y
06 R↓
07 STO ST T @   x       y       y       x
08 STO- ST Z @  x       y       y-x     x
09 × @          x*y     y-x     x       x
10 SQRT
11 X<>Y
12 2
13 ÷ @         (y-x)/2 sqrt(x*y) x      x
14 R↑
15 STO+ ST Y @  x       x'      y'      x
16 X≠Y?
17 GTO 02
18 END

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(41/42) AGM - Arithmetic-Geometric Mean - Werner - 06-09-2020 06:48 AM



User(s) browsing this thread: 1 Guest(s)