|
Boost : |
Subject: Re: [boost] [xint] Boost.XInt formal review
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2011-03-05 14:37:58
On Sat, 5 Mar 2011 14:19:05 +0000
Brent Spillner <spillner_at_[hidden]> wrote:
> I'd vote for "rabin_miller_pseudoprime()"... those familiar with
> number theory will understand exactly what it does, and you can add
> the number of iterations as a parameter with a sensible default value.
> Other users will at least recognize that it's not quite the same
> thing as a deterministic primality test, and if they look up the term
> 'pseudoprime' they'll find plenty of primer material on the subject.
> [...]
But explicitly naming the algorithm would preclude replacing its
internals with a faster and better algorithm that might come along
later. A more generic name means that any code using the function will
automatically get the benefit of any improvements to it.
is_probably_prime, and a forthcoming is_definitely_prime (once I've had
a chance to study the new-to-me algorithm that John Bytheway pointed
out), should do pretty much everything anyone needs.
-- Chad Nelson Oak Circle Software, Inc. * * *
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk