Factorial on Calculators
Name: John H.
How does a calculator come up with (1.5)! is equal to 1.329340388?
Mine does not. My guess is that your calculator is programmed to generate factorials using Stirling's
formula in one of its guises:
A: n! = ln(1) + ln(2) + ln(3) +ln(n) = SUM(k=1 --->n) [ln(k)] ~ (x = 1) INTEGRAL (x = n) [ln(x)]
dx = n*ln(n) - n+1.
B: n! = ( (x = 0) INTEGRAL (x = infinity) [(e^-x) * x^n] dx ~(2*pi*n)^1/2 * (n/e)^n
C: n! = [(2*n + 1/3)*pi)^1/2] * (n/e)^n
In all these formulas the symbol e=2.71828....
It is interesting that for (0)! formula C gives: (0)! = 1.0233... instead of (0)! = 1 which it is by
The factorial function is also related to the GAMMA function which is continuous and so allows the
extension of the definition of factorials to non-integer arguments. My notation is awkward because
the e-mail server does not allow symbols. Sorry.
As you know, factorials work only on integrer numbers, i.e. 6! = 6*5*4*3*2*1. But mathematicians have
generalized this to the Gamma function, which reduces to the factorials for whole numbers. But it has
values in between. So probably your calculator has this function (which goes up and down quite a lot,
it is a pretty wild function) built in.
See if gamma(1/2) = sqrt (pi).
Click here to return to the Mathematics Archives
Update: June 2012