On Tue, Sep 1, 2015 at 9:34 AM, Vincent Grunert <

[hidden email]> wrote:

>

https://en.wikipedia.org/wiki/Gamma_function>

> Just to be on the save side.

>

>

> On Tuesday, September 1, 2015 at 3:32:17 PM UTC+2, Vincent Grunert wrote:

>>

>> Just found this:

>>

>> use:

>>

>> #code

>> gamma(n+1)

>>

>> instead of:

>>

>> #code

>> factorial(n)

>>

>> it's not pretty but nicer then the bigint solutions I believe.

>>

This really depend on what you need. If you need all the digits,

there's no way around using BigInt. If you are doing some floating

point calculation, you can use gamma, although in practice I often

find lgamma is what I really need. (Since factorial often appears in

some expansion coefficient with pretty big numerator and denominator.

Using the log version can avoid floating point overflow)

>>

>>

>> On Wednesday, February 27, 2013 at 10:58:34 PM UTC+1, nbecker wrote:

>>>

>>> Total newb here, just playing around. A bit surprised by this:

>>>

>>> julia> factorial(100)

>>> 0

>>>

>>>

>>>

>