JuliaLang/julia — pull request #690 by fonnesbeck (2012-04-09 21:29:15+00:00)
Title: Replaced factorial function, added log-factorial

The current factorial function in Julia is the naive algorithm, which is inefficient, and for some reason produces negative values for relatively large n. I have replaced this with a version that uses the log-gamma function. In addition, I have added a log-factorial function (lfactorial), which is probably more useful, at least for statisticians.

I have also added a short combinatorics test file, that currently just contains a couple factorial testing statements.