Factorials of Decimals?

I just discovered something weird. I was fooling around with the calculator on my computer. And just for a laugh, I thought I’d take a factorial of a decimal. I was expecting nothing to come up, because I thought you could only take factorials (i.e., X!) of non-decimal numbers, 1, 2, 3 and so forth. But I got an answer!

My question then I guess is, Can you take factorials of whole numbers? And how exactly is that defined?

Thank you in advance, all who reply:)

The Gamma function is a generalization of the factorial for all nonnegative real numbers. No idea if that’s what your calculator was doing, though. It’s not exactly trivial.

Edit: link Gamma function - Wikipedia

To tell if it’s doing it correctly, try taking (1/2)!. It should come out to sqrt(pi)/2, or 0.88622692545… . But I expect that it probably is doing it correctly, since if they weren’t going to implement it correctly, by far the simplest thing to do is just to give an error message for nonnatural numbers.

I presume you mean here “of *non-*whole numbers”. I shall explain how exactly that is defined:

Suppose you wanted to extend the factorial function to arbitrary arguments. How might you do it?

Well, of course, there are a million ways to do it. (Where “a million” = “infinitely many”). You could say the factorial function is the normal thing at natural numbers, and sqrt(7) everywhere else. This wouldn’t be a very useful extension, but it technically qualifies.

What would make a more useful extension, then? Well, we want an extension that preserves the key properties of the factorial function. For example, that n!/(n−1)! = n.

This still isn’t enough to pin down an extension, though. There’s still infinitely many extensions of that sort.

But there’s another interesting property of the factorial function: n!/(n−r)! is the number of ways to pick a sequence of r items from n choices, with no repetition. This is similar to, albeit less than, the number of ways to do it if you allow repetition, n[sup]r[/sup]. And as n gets larger and larger, the probability of repetition gets negligible; we find that the ratio between n!/(n−r)! and n[sup]r[/sup] approaches 1 as n grows large while r is held fixed. (For that matter, the same thing happens to the ratio between n−r and n).

In other words, if the difference between a and b is held fixed while their individual values grow large, then the ratio between a!/b! and b[sup]a−b[/sup] approaches 1.

This is a very useful property. If we continue to demand this for our extension, on top of the basic 0! = 1 and n!/(n−1)! = n, we will pin down a unique function, like so:

n! = n!/(n+d)! × (n+d)!/d! × d!

If d is a natural number, then n!/(n+d)! and d! are easy to calculate as rising products; combining these two factors produces 1/(n+1) × 2/(n+2) × … × d/(n+d).

Furthermore, our newest demand is that the middle factor, (n+d)!/d!, become replaceable with d[sup]n[/sup] as d grows large.

Thus, we have that n! is the limit, as the natural number d grows large, of d[sup]n[/sup] × 1/(n+1) × 2/(n+2) × … × d/(n+d). And this definition makes sense for all kinds of n, not just natural numbers. (When n is a negative integer, there will be a division by zero, but for all other complex numbers, this limit will be well-defined)

This defines the usual extension of the factorial function to arbitrary inputs. As we demonstrated, this is the unique way to do so while satisfying our key properties. As it turns out, other definitions accomplish the same effect (and therefore are equivalent to this one); for example, mathematicians will often note that one can define n! via “analytic continuation of the integral from x = 0 to infinity of x[sup]n[/sup]/e[sup]x[/sup] dx”. But there’s no need to introduce the general factorial via this complicated definition when the above simple definition is available instead.

One last note: mathematicians will also often talk about the so-called “Gamma (Γ) function”. The Gamma function is just this extension of the factorial function, shifted over by one. The shifting over by one is of no importance at all. It’s just a stupid historical convention. So don’t worry about it. All that actually matters is the argument above, constructing and establishing the uniqueness of a suitable interpretation of factorial for general (non-integer) inputs.

Hm… that seems to have killed the thread stone-dead.

There’s not much defense to a Mark McGwire blast that fires the ball into the next county. :slight_smile: