# JF's calculations for PRIME numbers

Jonathan Laventhol jonathan.laventhol at imagination.com
Mon Sep 5 13:40:14 CDT 2005

```Hi All --

Regarding primes ...

>>> If anyone has any suggestions, they would be appreciated!
>>
>> I think we tried to direct you in the past towards arbitrary precision
>> integer arithmetic for your calculations, as you chose to deviate
>> from that it is my belief, at least, that you chose to waste your own
>> time.
>>
>>
> in the form of 2^n -1 you get some rather big numbers: 2^20996011 - 1 is
> 6,300,000 decimal digits.
> Ben alias woodelf

I believe there's no way to do anything at all with primes unless
all your numbers are accurate to (at least) 2^0, that is, they
are integers.  (Otherwise you don't even know if they're even or odd!)

So if you're using floating point numbers, you are limited to
the size of your mantissa; which might be a convenient way to
get something bigger than 32 bits, but it won't get you any
zero.)

So I'm with the others: Knuth + arbitrary precision.  There
are some other good books on specifically arithmetic with
primes.

May I ask what it's for?

Best regards,
J.

```