Subject: Re: ok, maybe this helps

From: Joaquin Grech <[email-masked]>
Date: Tue, 07 Dec 1999 20:43:37 -0500

Hi!

The chances are 1 in a million, but I know someone that is doing those numbers
every day :)

Anyway, our method is pretty fast programmed on C, on java it is too slow
because it takes forever allocating new bigintegers every time you add,
subtract, etc...
so that constant is huge.

I check for numbers up to 3000000 bits, and it took 3 hours with the system
method
to calculate one number and with our method... well, i stopped it after 2 days
and it
wasn't done :)

Karatsuba algorithm was the first method (I believe) that improved the original
O(n^2) multiplication.

Nowadays there are even faster method, the way it is usually used:

Up to X digits, use the normal multiplication method O(n^2)
Then use up to Y digits the Karatsuba algorithm
and then use the FFT algorithm (which I don't know yet, but it seems almost
linear)

There are plenty of documentation if you are interested :)

Joaquin Grech

Alice Dao wrote:

> yeah, i tried that too and it works pretty well.  But what's the chance that
> we have to multiply numbers with up to some 15 thousand number of bits? so
> in practice, our multiplication isn't that fast.
>
> ----- Original Message -----
> From: Joaquin Grech <[email-masked]>
> To: basic algorithm <[email-masked]>
> Sent: Tuesday, December 07, 1999 7:41 PM
> Subject: ok, maybe this helps
>
> > Hi!
> >
> > Maybe this helps, since there is such a huge different between both
> > method, I just followed Archi's instructions and only used
> > one method per test.
> >
> > For our multiplication method, I test starting from 100 bits.
> >
> > For the system multiplication method, I test starting from 15000 bits
> >
> > I use a pentium II 333 mhz, and jdk1.2, if you have a slower/faster
> > computer just change the bits length, but I think those would work
> > on any computer :)
> >
> > I hope that helps :)
> >
> > Joaquin Grech
> >
> > --
> > ---------------------------------------------------------------
> > !     C r e a t i v i t y     M u s t    S u r v i v e        !
> > ---------------------------------------------------------------
> > !  Fido: 2:341/19.67                 Euronet: 25:928/100.67   !
> > !  Internet: [email-masked]                            !
> > !  Http://www.creative1.net                 Ya me direis :)   !
> > ---------------------------------------------------------------
> >
> >
> >

--
---------------------------------------------------------------
!     C r e a t i v i t y     M u s t    S u r v i v e        !
---------------------------------------------------------------
!  Fido: 2:341/19.67                 Euronet: 25:928/100.67   !
!  Internet: [email-masked]                            !
!  Http://www.creative1.net                 Ya me direis :)   !
---------------------------------------------------------------