Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to calculate the inverse factorial of a real number? [closed]

Is there some way to calculate the inverse factorials of real numbers?

For example - 1.5 ! = 1.32934039

Is there some way to obtain 1.5 back if I have the value 1.32934039?

I am trying

http://www.wolframalpha.com/input/?i=Gamma^(-1)[1.32934039]

but that is a fail.

like image 663
Lazer Avatar asked Jun 21 '10 13:06

Lazer


2 Answers

Using wolframalpha.com, you can ask for

Solve[Gamma[x+1]==1.32934039,x]

As mentioned in the comments, Gamma does not have a unique inverse. True even when you are solving for a conventional factorial, e.g.

Solve[Gamma[x+1]==6,x]

yields several answers, of which one is 3.

Instead of using Gamma[] in WolframAlpha, you can also use Factorial[]:

Solve[Factorial[x]==6,x]
Solve[Factorial[x]==1.32934039,x]
like image 166
brainjam Avatar answered Oct 12 '22 08:10

brainjam


David Cantrell gives a good approximation of Γ-1(n) on this page:

k = the positive zero of the digamma function, approximately 1.461632
c = Sqrt(2*pi)/e - Γ(k), approximately 0.036534
L(x) = ln((x+c)/Sqrt(2*pi))
W(x) = Lambert W function
ApproxInvGamma(x) = L(x) / W(L(x) / e) + 1/2
like image 35
BlueRaja - Danny Pflughoeft Avatar answered Oct 12 '22 07:10

BlueRaja - Danny Pflughoeft