title: Go print large number
body: <p>I am currently doing the Go Lang tutorial, "Numeric Constants" to be precise. The example code starts with the following statement:</p>
  
  <pre><code>const (
      // Create a huge number by shifting a 1 bit left 100 places.
      // In other words, the binary number that is 1 followed by 100 zeroes.
      Big = 1 &lt;&lt; 100
      // Shift it right again 99 places, so we end up with 1&lt;&lt;1, or 2.
      Small = Big &gt;&gt; 99
  )
  </code></pre>
  
  <p>The constant <code>Big</code> is obviously huge, and I am trying to print it and its type, like this:</p>
  
  <pre><code>fmt.Printf("%T", Big)
  fmt.Println(Big)
  </code></pre>
  
  <p>However, I get the following error for both lines:</p>
  
  <blockquote>
    <p># command-line-arguments ./compile26.go:19: constant 1267650600228229401496703205376 overflows int</p>
  </blockquote>
  
  <p>I would try casting Big to some other type, such as <code>uint64</code>, which it overflowed with the same error, or just convert it to a string, but when trying <code>Big.String()</code> I get the following error:</p>
  
  <blockquote>
    <p>Big.String undefined (type int has no field or method String)</p>
  </blockquote>
  
  <p>It appears that its type is <code>int</code>, yet I can't print it or cast it to anything and it overflows all methods. What do I do with this number/object and how do I print it?</p>