On Sun, Feb 22, 2009 at 9:52 PM, Paul Zimmermann <paul.zimmerm...@loria.fr> wrote: > > I'm not sure I can post to sage-devel. Anyway, if computing Stirling numbers > reduces to compute factorial-like expressions, the best algorithm I know is > due to Schönhage; Cf for example for double factorials: > http://gmplib.org/list-archives/gmp-discuss/2009-January/003510.html > > Paul Zimmermann
Thanks for the input. Unfortunately, I don't see how Schönhage's factorial algorithm can be adapted to harmonic numbers or Stirling numbers, due to the way the partial products need to be summed. A slight improvement to the plain binary splitting method is to factor out 1/2 to eliminate 25% of the terms. But factoring out larger primes seems to give rapidly diminished returns, unless there is some clever way to do it that eludes me. Fredrik --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---