title: Understanding the use of BigInt
body: <p>I'm struggling to understand how to use <code>BigInt</code> correctly. It seems to me that one should use <code>BigInt</code> when <code>Int64</code> or <code>Int128</code> is not enough, and apparently <code>BigInt</code> uses arbitrary precision arithmetic (of which I have no knowledge of). </p>
  
  <p>Let's say I want to compute the factorial of some big number, e.g. 30. I don't know how many bits is required to store <code>factorial(30)</code> but both</p>
  
  <pre><code>test = Int128
  test = factorial(30)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>test = BigInt
  test = factorial(30)
  </code></pre>
  
  <p>produces <code>-8764578968847253504</code> which is obviously incorrect. </p>
  
  <p>According to the Julia lang documentation, it seems that the usual mathematical operators are defined for this type (BigInt), and the results are promoted to a <code>BigInt</code>. Therefore I fail to see what I'm doing wrong, I have obviously misunderstood something. Hoping some of you might have an explanation for me :)</p>
  
  <p>PS: I'm running the 64-bit version of Windows 7 if that has anything to say</p>