Search code examples
algorithmmathfactorial

How to calculate the inverse factorial of a real number?


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.


Solution

  • 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]