title: Reverse factorial fun won't go beyond 170
body: <p>I am a beginner at pyhon and I'm trying to reverse the factorial function.
  The factorial of 5 is 120
  And I want my code to take input 120 and be able to return 5
  Here's my present code:</p>
  
  <pre><code>`from math import factorial
      def rf(f):
          d=2
          while f/factorial(d) != 1:
              if f/factorial(d) &lt;= 1:
                   print("Entered number is not a factorial")
                   return
              d += 1
          return int(d)`
  </code></pre>
  
  <p>It can reverse the factorial upto 170.But when I enter the factorial of 171 the code gets into OverFlowError.
  Is there a solution to my code?
  or, a more reliable code to reverse factorial.</p>