title: I want to use big integer in my android app but when ever i apply operators i get error?
body: <p>I want to calculate factorial my code at present is this:</p>
  
  <pre><code>else if(btn.getText().equals("x!"))
      {
          double LeftVal = Double.parseDouble(currentInput);
          double result = Double.NaN;
          if(currentInputLen &gt; 0 &amp;&amp; LeftVal &gt;0)
          {
              result = Factorial(LeftVal);
          }
  
          resultText.setText(result+"");
      }
  </code></pre>
  
  <p>code to calculate factorial is this:</p>
  
  <pre><code>private double Factorial(double input)
  {
      double output=input;
      for(int i=(int) (input-1);i&gt;0;i--)
      {
          output*=i;
      }
  
      return output;
  }
  </code></pre>
  
  <p>I imported java.math.*; and changed my code to this:</p>
  
  <pre><code>else if(btn.getText().equals("x!"))
      {
          BigInteger LeftVal = BigInteger(currentInput);
          BigInteger result = 0;
          if(currentInputLen &gt; 0 &amp;&amp; LeftVal &gt;0)
          {
              result = Factorial(LeftVal);
          }
  
          resultText.setText(result+"");
      }
  </code></pre>
  
  <p>and factorial method to this</p>
  
  <pre><code>private BigInteger Factorial(BigInteger input)
  {
      BIgInteger output=input;
      for(int i=(int) (input-1);i&gt;0;i--)
      {
          output*=i;
      }
  
      return output;
  }
  </code></pre>
  
  <p>I saw on android developer site that BigInteger(string)  will convert that string to big integer but that does not work and shows error also there were errors on using regular mathematical errors.</p>
  
  <p>The reason i want to use big integer is because if i calculate 12! using double it shows answer in scientific form with e raised to power something i want exact answer.</p>