WP 34S Pollard Rho Factorization - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: Not HP Calculators (/forum-7.html) +--- Forum: Not quite HP Calculators - but related (/forum-8.html) +--- Thread: WP 34S Pollard Rho Factorization (/thread-1262.html) |
WP 34S Pollard Rho Factorization - Gerald H - 05-07-2014 10:38 AM Programme to factorize integers, recommend word size 64 & unsigned: 1 LBL 'PRO' 2 BASE 10 3 0 4 STO 01 5 x<>Y 6 ENTER 7 STO 00 8 RCL 00 9 x<>Y 10 x≠? Y 11 RTN 12 INC 01 13 1 14 STO 02 15 STO 03 16 RAN# 17 RCL 00 18 RMDR 19 STO 04 20 RCL X 21 RCL 00 22 *MOD 23 RCL+ 01 24 ENTER 25 RCL- 04 26 RCL 00 27 GCD 28 x≠1? 29 BACK 021 30 R↓ 31 DSE 03 32 BACK 012 33 RCL 02 34 RCL+ 02 35 STO 02 36 STO 03 37 R↓ 38 STO 04 39 RCL X 40 RCL 00 41 *MOD 42 RCL+ 01 43 DSE 03 44 BACK 05 45 RCL 02 46 STO 03 47 R↓ 48 BACK 028 RE: WP 34S Pollard Rho Factorization - walter b - 05-07-2014 02:26 PM Thanks, Gerald, for your contribution. A minimum of documentation would be appreciated though. d:-/ RE: WP 34S Pollard Rho Factorization - Gerald H - 05-07-2014 05:56 PM Input to the programme is a composite integer on level X of stack, output is a factor on stack level X. RE: WP 34S Pollard Rho Factorization - Gerald H - 03-11-2017 04:02 PM Sorry for the delay, here more info on the algorithm: https://en.wikipedia.org/wiki/Pollard%27s_rho_algorithm |