Remix.run Logo
Fast Factorial Algorithms(luschny.de)
6 points by nill0 3 days ago | 3 comments
senfiaj 13 minutes ago | parent | next [-]

Since factorials grow very fast maybe use a small table for smaller integers and switch to Stirling's formula for larger approximations?

smokel 44 minutes ago | parent | prev | next [-]

I hoped this would help me solve some more Project Euler [1] problems. Unfortunately, the algorithms given are not explained in detail, so the learning experience is somewhat mediocre. Then again, I have ChatGPT to elucidate them for me.

This article [2] has some interesting details on the swinging factorial function n≀, but I can't seem to find the essay that it references: "Swing, divide and conquer the factorial", 2008.

[1] https://projecteuler.net/

[2] https://oeis.org/A000142/a000142.pdf

dvh 24 minutes ago | parent | prev [-]

No Stirling formula?