Syeoryn/constant.js — pull request #3 by ackrause (2014-04-26 16:48:49+00:00)
Title: Improves nFactorial

After much thought and effort I was able to improve `nFactorial`'s algorithm to determine factorials for higher numbers before hitting the stack limit. This improvement comes with no detriment to `nFactorial`'s existing functionality, and thanks to the foresight of Constant's main dev team, this change also allows for a greater solution space to the n-rooks problem.

With these changes, `nFactorial` can now determine the factorial of numbers up to and including 20 in constant time.