fac_ui rewrote.
Torbjorn Granlund
tg at gmplib.org
Thu Dec 8 12:35:46 CET 2011
bodrato at mail.dm.unipi.it writes:
> Would you consider migrating this to mpn at some point, or is there a
> reason to keep it at mpz?
It is possible to migrate to mpn, but not very easy, because one should
estimate the length of every partial result. There are a lot of
MPZ_REALLOC in the current code...
It should also be possible to have a far better memory management and to
reduce the global footprint of the computation.
I see. The new log table I committed a few months back might help
in computing Stirling's formula:
log(n!) ~= 0.5*log(2*pi) + (0.5+$n)*log($n) - $n
But the important thing now is to get the basic improvements.
Meanwhile, we have a regression for a handful of hosts:
/home/gmp/check/failure/biko-openbsd64.gmplib.org:64:FAIL: t-fac_ui
/home/gmp/check/failure/kolga.bibsys.no:32:FAIL: t-fac_ui
/home/gmp/check/failure/kolga.bibsys.no:mode64:FAIL: t-fac_ui
/home/gmp/check/failure/loulou.esiee.fr:64:FAIL: t-fac_ui
/home/gmp/check/failure/tjockbiko-openbsd64.gmplib.org:64:FAIL: t-fac_ui
/home/gmp/check/failure/zeipel.astro.uu.se:1.0:FAIL: t-fac_ui
/home/gmp/check/failure/zeipel.astro.uu.se:2.0n:FAIL: t-fac_ui
/home/gmp/check/failure/zeipel.astro.uu.se:2.0w:FAIL: t-fac_ui
(Note that gmplib.org/devel/tm-date.html is bright red; there is a
regression related to fat binaries too, for which I am responsible.)
--
Torbjörn
More information about the gmp-devel
mailing list