isPrime bug?

Get help with using the PHP Secure Communications Library.

Moderator: Nuxius

Forum rules
The purpose of this forum is to provide support for phpseclib, a pure PHP SSH / SFTP / RSA library.

Posts by new users are held in a moderation queue and are not publicly visible until the post is approved.

isPrime bug?

Postby greyhoundx » Sun Dec 13, 2009 7:37 am

Hi, I think isPrime has bugs with small numbers.

I think:
- It goes into infinite loop when n = 1
- It determines that no number between 3 and 1000 is a prime
greyhoundx
Traveler
 
Posts: 1
Joined: Sun Dec 13, 2009 7:31 am

Re: isPrime bug?

Postby TerraFrost » Mon Dec 14, 2009 6:18 pm

The latest CVS version should fix this - thanks for reporting it :)
TerraFrost
Legendary Guard
 
Posts: 12357
Joined: Wed Dec 04, 2002 6:37 am


Return to phpseclib support

Who is online

Users browsing this forum: No registered users and 2 guests

cron