(35s) Primality test using optimized brut force - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (35s) Primality test using optimized brut force (/thread-12425.html) |
(35s) Primality test using optimized brut force - fred_76 - 02-14-2019 01:44 PM A program to find the factors of a number, or check if it is prime. Enter N then press XEQ P Returns
Code: P001 LBL P :Prime calc routine For those who still care : LBL P LN=314 CK=91DA Running time 6 digits (999 983) = 00:00:09.7 7 digits (9 999 991) = 00:00:28.2 8 digits (99 999 989) = 00:01:27.7 9 digits (999 999 937) = 00:04:36.4 10 digits (9 999 999 967) = 00:14:37.0 11 digits (99 999 999 977) = 00:46:26.2 12 digits (999 999 999 989) = 02:32:18.3 Discussion thread is here : http://www.hpmuseum.org/forum/thread-12406-post-112029.html#pid112029 Feel free to comment in the discussion thread ! Fred |