Power calculation without using BigNumber
<p>How do I solve the following?</p>

<ol>
<li>Calculate X^Y without Big Integer or Big Number.</li>
<li>Need to print all digits e.g. 2^64 = 18446744073709551616.</li>
</ol>

<p>I have written code in Java, but I am not getting the exact result for higher digits.</p>

<p>My code:</p>

<pre><code>public class Calculation {

    ArrayList&lt;Double&gt; c = new ArrayList&lt;Double&gt;();
    double a = 2;
    double b = 64;
    double[] d = new double[5];


    public void powerCalculation()
    {
        d[0] = java.lang.Math.pow(a, b);
        System.out.println(d[0]);
    }


    public static void main(String[] args)
    {
        Calculation calculation = new Calculation();
        calculation.powerCalculation();
    }
}
</code></pre>