title: Double +inf calculations
body: <p>I have a financial equation that gives very large outputs like 10 ^ 800. But for some reason when i do the calculation it gives me and output of +inf. How can I overcome this to perform large calculations without using any library?. The equation and the hypothetical substitutes as follow.</p>
  
  <pre><code> //Values
  n = 12.0
  r = 95.60
  t = 120.2
  PMT = 20000.00
  </code></pre>
  
  <p>Code </p>
  
  <pre><code>    let commonfactor = pow((1 + (r/n)), (n*t)) // this returns inf
      let denominator = r/n
      let numerator = ((commonfactor) - 1)
  
      let finalOutput = PMT * (numerator/denominator)
  </code></pre>
  
  <p>Equation
  <a href="https://i.stack.imgur.com/raPZM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/raPZM.png" alt="ft"></a></p>