# Is it possible to get factorial of negative number

• February 12th, 2011, 05:56 PM
Lokesh
Is it possible to get factorial of negative number
• February 12th, 2011, 06:27 PM
helloworld922
Re: Is it possible to get factorial of negative number
Technically, no. However, there is something called the Gamma function which is an extension of the factorial function.

See: Gamma function - Wikipedia, the free encyclopedia
• August 4th, 2011, 04:27 PM
javapenguin
Re: Is it possible to get factorial of negative number
Technically there is.

There is such a thing as .5!

Since (x-1)! = x!/x

(-.5)! = (.5)!/.5 = 2 * (.5)!

However, anything less than -.5 has no factorial as it'd be dividing by 0.

i.e. -1! = 0!/0 = 1/0
-2! = -(1/0) /0

I didn't even know about decimal factorials, but I tried it with my calculator and it found that .5 factorial was valid, so I tried -.5 factorial and it worked too.
• August 4th, 2011, 05:45 PM
helloworld922
Re: Is it possible to get factorial of negative number
Quote:

Originally Posted by javapenguin
Technically there is.

There is such a thing as .5!

Since (x-1)! = x!/x

(-.5)! = (.5)!/.5 = 2 * (.5)!

However, anything less than -.5 has no factorial as it'd be dividing by 0.

i.e. -1! = 0!/0 = 1/0
-2! = -(1/0) /0

I didn't even know about decimal factorials, but I tried it with my calculator and it found that .5 factorial was valid, so I tried -.5 factorial and it worked too.

Likely you're calculator is actually computing the gamma function. The gamma function exists for all complex numbers except non-negative integers.

It's been roughly defined as (n-1)!, though the true definition is an improper integral (see the wikipedia article).

The definition of the classical factorial function only exists for positive real numbers, with a special exception that 0! = 1.