At 04:13 PM 10/26/98 -0500, Foghorn Leghorn wrote:

>Question: does Prime95 use floating point because the algorithm requires 
>it, or because something about the Intel architecture makes it a good 
>choice? I'm not clear about how Prime95 is able to use floating point to 
>perform something that is theoretically an all-integer computation. Is 
>there any platform on which an all-integer implementation would be 
>superior to one that uses floating point?

To do arithmetic on large numbers (such as Mersenne primes) you have to break
it down into much smaller pieces.  This is called multiple precision.  The
larger the individual pieces, the fewer of them you need.  You can store
64-bit
integers in the floating point hardware.  You can also do 64-bit arithmetic
with integers, but on current x86 processors, you have to do it with two
32-bit
pieces.  In my experience, on a Pentium at least, it is faster to use the FPU
than do it with the double-precision integers.


+-------------------------------------------------+
| Jud McCranie  [EMAIL PROTECTED]       |
|                                                 |
| You'll never need more than 640 megs of memory. |
+-------------------------------------------------+

Reply via email to