non/spire — pull request #141 by non (2013-08-20 16:59:49+00:00)
Title: Add fib, fact, and choose functions to spire.math.

The functions are:

fib(n): The nth Fibonnaci number (the 0th is 0, the 1st is 1)
fact(n): The nth factorial (the 0th is 0, the 1st is 1)
choose(n, k): The binomial coefficient (n k), i.e. n!/k!(n-k)!

These three functions aren't hard to implement, but in Spire we have
an opportunity to create versions that are a bit faster (or more
resilient) than a totally naive approach.

There is still a lot of room to make these methods faster. But
for now they seem to perform well.