Re: Give up with MT, need help!!!

Karim Belabas <[email protected]>
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <ZIo3OwXQKY/[email protected]>
* Bill Allombert [2023-06-14 21:30]:
[...]
> But this is not the right way to compute this. You should use
> the recurrence formula for the factorial
> k! = k*(k-1)! and not recompute k!^3, (3*k)!, (6*k)! for all k from scratch.
> (3*k)!= (3*k)*(3*k-1)*(3*k-2)*(3*(k-1))!
> etc.
> Also you should factor out 640320^(3/2) to avoid recomputing it.

... and use binary splitting to have the right complexity
(a multithreaded version remains possible, but harder to get right).

Cheers,

    K.B.
-- 
Pr. Karim Belabas, U. Bordeaux, Vice-président en charge du Numérique
Institut de Mathématiques de Bordeaux UMR 5251 - (+33) 05 40 00 29 77
http://www.math.u-bordeaux.fr/~kbelabas/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.