General

Profile

steveb3210 (Stephen Blackstone)

  • Login: steveb3210
  • Registered on: 04/29/2016
  • Last sign in: 02/20/2020

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 0 1 1

Activity

02/20/2020

07:19 PM Ruby Feature #16468: Switch to Miller-Rabin for Prime.prime?
Attached is the latest diff. steveb3210 (Stephen Blackstone)
07:18 PM Ruby Feature #16468: Switch to Miller-Rabin for Prime.prime?
Dan0042 (Daniel DeLorme) wrote in #note-15:
> I think it would be interesting to expose the algorithm for larger numbers. So you could have `miller_rabin` which allows any integer, and `prime?` which checks the value and either call `mi...
steveb3210 (Stephen Blackstone)
05:45 AM Ruby Feature #16468: Switch to Miller-Rabin for Prime.prime?
- Add bounds check
- Add test
steveb3210 (Stephen Blackstone)

01/05/2020

02:05 AM Ruby Feature #16468: Switch to Miller-Rabin for Prime.prime?
On second thought, I think Marc is right, we can't ruin someones day with a composite without a warning that theres a non-zero probability of it being incorrect so I will update...... steveb3210 (Stephen Blackstone)
01:23 AM Ruby Feature #16468: Switch to Miller-Rabin for Prime.prime?
marcandre (Marc-Andre Lafortune) wrote:
> Interesting. We might as well always return the correct result, i.e. apply the fast algorithm for integers < 318,665,857,834,031,151,167,461 and the slow algorithm for larger ones. Would you car...
steveb3210 (Stephen Blackstone)

01/04/2020

07:19 PM Ruby Feature #16468: Switch to Miller-Rabin for Prime.prime?
Attached is an implementation against master.... steveb3210 (Stephen Blackstone)

12/30/2019

07:27 PM Ruby Feature #16468 (Closed): Switch to Miller-Rabin for Prime.prime?
The miller-rabin algorithm is a non-deterministic primality test, however it is known that below 2**64, you can always get a deterministic answer by only checking a=[2,3,5,7,11,13,17,19,23, 29, 31, 37]
Given that Prime.prime? would ne...
steveb3210 (Stephen Blackstone)

Also available in: Atom