title: How do I calculate an array of very large numbers without getting NaN in my output?
body: <p>I made a calculator that works for small numbers but when the results get too large it returns NaN</p>
  
  <pre><code>List&lt;string&gt; memory = new List&lt;string&gt; { };
  
  string display = "";
  while (display.Contains("%") == false)
  {
      string line = ReadLine();
      display = line;
      memory.Add(line);
  }
  
  float result = float.Parse(memory[0]);
  
  for (int i = 1; i &lt; memory.Count; i++)
  {
      string temp = memory[i];
      char[] _temp = temp.ToCharArray();
      _temp = _temp.Where(x =&gt; x &gt; _temp[0]).ToArray();
      float num = float.Parse(string.Join("", _temp));
  
      if (temp.Contains("+") == true) result += num;
      else if (temp.Contains("-") == true) result -= num;
      else if (temp.Contains("*") == true) result *= num;
      else if (temp.Contains("/") == true) result /= num;
      else if (temp.Contains("%") == true) result %= num;
  }
  </code></pre>
  
  <p>Take these numbers for example:</p>
  
  <pre><code>797 * 2 + 38 * 212 * 275 * 806 * 67 * 9939 + 7 + 74 + 515 + 610 * 516 * 6921
  + 4 * 2 * 494 * 3153 * 8 + 2501 * 769 + 4 * 2472 + 1 * 21 * 6535 + 30 + 26
  + 44 + 240 + 88 * 1111 * 817 * 1576 + 551 * 535 + 9150 + 36 * 85 * 4598
  * 9276 * 766 + 584 + 5 * 1 + 7 + 45 * 8152 % 7984
  </code></pre>
  
  <p>I enter each number in a new readline with the math symbol infront of it.
  If you test it with these numbers just be aware. </p>
  
  <p>I've looked everywhere and cant figure out a solution to this problem so that it can return a real number.</p>
  
  <p>Anyone know what I can do to fix this?</p>