Arithmetic-Geometric Mean (HP-15C, HP-67) - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: Arithmetic-Geometric Mean (HP-15C, HP-67) (/thread-6330.html) |
Arithmetic-Geometric Mean (HP-15C, HP-67) - Gerson W. Barbosa - 05-31-2016 04:54 PM Arithmetic-Geometric Mean HP-15C Code:
Code:
HP-67 Code:
Examples: 1) AGM(3,4) 3 ENTER 4 f A -> 3.482027677 (6) 2) AGM(12345,6789) 12345 ENTER 6789 f A -> 9359.761031 (2) 3) √(2* π*√(2* π)/AGM(1,√(2))) = Γ(1/4) 2 π * √x g LASTx * 2 √x 1 f A / √x --> 3.625609909 (8) 4 1/x 1 - f x! --> 3.625609908 Notes: 1) Examples above on the HP-15C, first version program; 2) The second HP-15C program version uses the numbered register 0, but preserves its original content; 3) All versions preserve the original stack-register X; 4) The programs are based on an HP-41C program by Jean-Marc Baillard: Code:
Optimization suggestions welcome. Gerson. |