Post Reply 
(HP41) Iterated function with convergence to square root (Heron method)
04-25-2023, 05:51 PM (This post was last modified: 04-29-2023 01:22 PM by C.Ret.)
Post: #2
RE: (HP41) Iterated function with convergence to square root (Heron method)
Hi,

It reminds me of a program, using this exact method, written for a silly challenge on a French forum. (Look for MPO n°46 on Silicium).


001 LBL"HERON"  RCL Y  RCL Y  /  +  2  /  END  

Usage:
Enter the number b whose square root you want to determine.
Press ENTER^.
Optionally enter the approximation a0.
Run the XEQ (ALPHA)HERON(ALPHA) program.

A better approximation is displayed.
Repeat the computation by pressing R/S . You will see the successive approximations quickly converging towards the square root of b.

To extract another root, simply enter a new value, press ENTER^, enter an optional guess approximation and restart with R/S.


Example:
2    FIX 9                     2,000000000
1.5  XEQ (ALPHA)HERON(ALPHA)   1,416666667
     R/S                       1,414215687
     R/S                       1,414213563
     R/S                       1,414213563
     ...                                  
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (HP41) Iterated function with convergence to square root (Heron method) - C.Ret - 04-25-2023 05:51 PM



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