title: Overflow in ASP Classic
body: <p>I was wondering if someone could help me, as I have gone blind to what I believe is a simple cause to a simple error.</p>
  
  <p>I have this code:</p>
  
  <pre><code> doRound1(x1)
    denom1 = 5
    y1 = denom1 - x1 mod denom1
    if y1 &lt;&gt; denom1 then
      x1= x1+y1
    end if
  
    doRound1=x1
   End function
  
   'theCalc = 20488888888.684
    theCalc = cDbl(11111111111) * 1.844
    doRound1(theCalc)
  </code></pre>
  
  <p>I get this error</p>
  
  <pre><code>Microsoft VBScript runtime  error '800a0006'
  Overflow: 'x1'
  </code></pre>
  
  <p>Caused by this line in the above code:</p>
  
  <pre><code> y1 = denom1 - x1 mod denom1
  </code></pre>
  
  <p>Any ideas? As I say, I have gone blind this p.m.</p>