On 12/13/04 11:48 AM, "Mike Hall" <email@hidden> wrote:
> started looking at this with java and BigInteger since the main interest in
> primes these days, along the lines of RSA crypto, seems to be how big can you
> find primes and/or factor the product of two of them.
> Right off I seemed to need square root which is lacking in BigInteger.
If I you just need the square root to be able to determine
if (n1 < sqrt(n2))
you could instead change to:
if ((n1 * n1) < n2)
and this is probably a lot faster than using any square root function.
--
Cameron Hayne (email@hidden)
Hayne of Tintagel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden
This email sent to email@hidden