title: Java definition of infinity
body: <p>I try to run this code in java</p>
  
  <pre><code>System.out.println(Math.pow(2,1024));
  System.out.println(Math.pow(2,1023));
  </code></pre>
  
  <p>the results:</p>
  
  <blockquote>
    <p>Infinity</p>
    
    <p>8.98846567431158E307</p>
  </blockquote>
  
  <p>I'm wondering - why 2^1024 is infinity? and 2^1023 isn't? I guess that there is a connection to the fact that 1024 is 2^10, but I don't really get it. Also, will the answer change if I will try to run it in a machine with 124 bit instead of 64 bit?</p>
  
  <p>little confused, will appreciate any help :)</p>