(35S) Fermat's Factorization Programme

05302014, 06:31 PM
(This post was last modified: 06152017 01:26 PM by Gene.)
Post: #1




(35S) Fermat's Factorization Programme
For input of a positive composite odd number the programme returns a factor. Fermat's method seeks to find two squares differing by the input as
n= x^2y^2=(x+y)(xy) & hey presto, two factors have been found. 1 LBL X 2 STO A 3 SQRTx 4 IP 5 2*REGX+1►X 6 SGN 7 STO Y 8 R↓ 9 x^2 10 RCL A 11 x=0? 12 GTO X024 13 RCL+ X 14 2 15 STO+ X 16 R↓ 17 RCL Y 18 2 19 STO+ Y 20 R↓ 21 x>0? 22 GTO X017 23 GTO X011 24 RCL X 25 RCL Y 26 2 27 ÷ 28 RTN 

« Next Oldest  Next Newest »

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