Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The problem is that you just passed the range that integer allows.</p> <p><code>Int</code> allow numbers from <strong>-2,147,483,648</strong> to a maximum value of <strong>2,147,483,647</strong> (inclusive) (<a href="http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html" rel="nofollow noreferrer">source</a>), since <code>74^5 = 2,219,006,624</code>. Thus, more that the <code>Int</code> can handle.</p> <p>If you want a bigger range you can use java <a href="http://docs.oracle.com/javase/1.4.2/docs/api/java/math/BigInteger.html" rel="nofollow noreferrer">BigInteger</a> Class. A code example:</p> <pre><code>BigInteger pow(BigInteger base, BigInteger exponent) { BigInteger result = BigInteger.ONE; while (exponent.signum() &gt; 0) { if (exponent.testBit(0)) result = result.multiply(base); base = base.multiply(base); exponent = exponent.shiftRight(1); } return result; } </code></pre> <p><strong>Considerations:</strong> This may not be very efficient and might not work for negative bases or exponents. Use it as an example on how to use BigIntegers.</p> <p>Instead of BigInteger, you can also use the <code>long</code> type that vary from -<strong>9,223,372,036,854,775,808</strong> to <strong>9,223,372,036,854,775,807</strong> (inclusive) (<a href="http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html" rel="nofollow noreferrer">source</a>).</p> <p>Do not use <code>double</code> for this purpose, since you can have precision <a href="https://stackoverflow.com/questions/322749/retain-precision-with-doubles-in-java">problems</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload