[HP35s] Program for prime number (Wheel Sieve and Miller-Rabin)
|
02-16-2019, 05:39 PM
(This post was last modified: 02-16-2019 05:42 PM by Gerald H.)
Post: #30
|
|||
|
|||
RE: [HP35s] Program for prime number (brut force)
(02-16-2019 02:12 PM)Thomas Klemm Wrote:(02-16-2019 12:54 PM)Gerald H Wrote: Please report a number falsely returned as prime. "Chances are..." - No. "At least 3/4 of bases are witnesses..." - Yes, but how many are in fact witnesses? The "at least" allows the likelihood that many more than 3/4 are witnesses, & that is in fact generally the case. Set at random N := 803189 * 485909 the product of two primes, how many bases are actually witnesses? Try running PRIME?, I will be very surprised if the 35s is fast enough for you to repeat the test until a 1 appears. I use one test as it's reliable enough - Certainty is expensive, if you're really not sure try running the programme again. For larger numbers, say 2^555 range, one test gives certainty. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 15 Guest(s)