Post Reply 
(41/42) AGM - Arithmetic-Geometric Mean
06-10-2020, 11:23 AM
Post: #7
RE: (41/42) AGM - Arithmetic-Geometric Mean
(06-10-2020 08:02 AM)Werner Wrote:  If you don't like that the global label gets excuted in the loop, put it before LBL 02 and place a Rv in between, again at the expense of 1 byte

No, that’s not an issue. But I would like the program to preserve the previous content of stack register X so that chained calculations involving AGM are possible without the use of numbered registers to store intermediate results.

Example:

agm(1, 2) + agm(3, 4)

1 ENTER 2 XEQ AGM 3 ENTER 4 XEQ AGM +



4.938818707406477275808395332421768


Anyway, the low byte count and least number of steps are very nice!

Gerson.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (41/42) AGM - Arithmetic-Geometric Mean - Gerson W. Barbosa - 06-10-2020 11:23 AM



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