The Pi function is an extension of the factorial over the reals (or even complex numbers). For integers n, Π(n) = n!, but to get a definition over the reals we define it using an integral:
In this challenge we will invert the Π function.
Given a real number z ≥ 1, find positive x such that Π(x) = z. Your answer must be accurate for at least 5 decimal digits.
120 -> 5.0000 10 -> 3.39008 3.14 -> 2.44815 2017 -> 6.53847 1.5 -> 1.66277