Write the shortest code that will take any real number greater than 1 as input and will output its positive inverse factorial. In other words, it answers the question "what number factorial is equal to this number?". Use the Gamma function to extend the definition for factorial to any real number as described here.
input=6 output=3 input=10 output=3.390077654
3! = 6 and
3.390077654! = 10
- It is forbidden to use built in factorial functions or gamma functions, or functions that rely on these functions.
- The program should be able to calculate it to 5 decimal digits, with the theoretical ability to calculate it to any precision (It should contain a number that can be made arbitrary big or small to get arbitrary precision)
- Any language is allowed, shortest code in characters wins.
I made a working example here. Have a look.
I will choose a winner 7 days after I posted this!