[AccessD] Weekend fun: Primes

Mark A Matte markamatte at hotmail.com
Fri Dec 9 15:14:03 CST 2005


Gustav,

For whatever reason your email inspired me to look at primes...and I wrote a 
module in A2k that would determine if a number was prime or not...it seems 
to work fine...until I get to the number 2,147,483,647  .  I'm using the MOD 
function in the module...and it apparently cannot handle a number larger 
than this in VBA...I get an "OVERFLOW" error.  Any ideas?

Thanks,

Mark

P.S...and if this is calculating correctly...2,147,483,647 just happens to 
be PRIME!!!



>From: "Gustav Brock" <Gustav at cactus.dk>
>Reply-To: Access Developers discussion and problem 
>solving<accessd at databaseadvisors.com>
>To: <accessd at databaseadvisors.com>
>Subject: [AccessD] Weekend fun: Primes
>Date: Fri, 09 Dec 2005 16:47:17 +0100
>
>Hi all
>
>Bored with report design, stubborn queries and/or naughty kids?
>
>"The problem of distinguishing prime numbers from composite numbers and of 
>resolving the latter into their prime factors is known to be one of the 
>most important and useful in arithmetic. [...]
>The dignity of the science itself seems to require that every possible 
>means be explored for the solution of a problem so elegant and so 
>celebrated."
>   Carl Friedrich Gauss (1777-1855)
>
>A young, clever guy, Per Leslie Jensen, has dealt with this. Here's his 
>presentation:
>
>   http://www.pgnfs.org
>
>Well done and worth a study!
>
>/gustav
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com





More information about the AccessD mailing list