title: Test cases for numeric input
body: <p>What are some common (or worthwhile) tests, test questions, weaknesses, or misunderstandings dealing with numeric inputs?</p>
  
  <p><em>This is a community wiki.  Please add to it.</em></p>
  
  <p>For example, here are a couple sample ideas:</p>
  
  <ul>
  <li>I commonly see users enter text into number fields (eg, ">4" or "4 days", etc).</li>
  <li>Fields left blank (null)</li>
  <li>Very long numeric strings</li>
  <li>Multiple decimals and commas (eg, "4..4" and "4,,434.4.4")</li>
  <li>Boundary Value Analysis:
  
  <ul>
  <li>Lower Boundary</li>
  <li>Lower Boundary - 1 (for decimal/float, use smaller amounts)</li>
  <li>Upper Boundary</li>
  <li>Upper Boundary + 1</li>
  <li>Far below the lower boundary (eg, beyond the hardware boundary value)</li>
  <li>Far above the upper boundary</li>
  <li>middle of the range</li>
  </ul></li>
  <li>0</li>
  <li>0.0</li>
  <li>White space, nothing else "   "</li>
  <li>String input &amp; other incorrect data types.</li>
  <li>Number with text in front or back, eg "$5.00", "4 lbs", "about 60", "50+"</li>
  <li>Negative numbers</li>
  <li>&#43; sign with positive numbers, "+4"</li>
  <li>Both plus and minus sign, eg "+-4" and "-4e+30"</li>
  <li>Exponents of 10, both uppercase and lowercase, positive and negative eg "4e10", "-5E-10", "+6e+60", etc</li>
  <li>Too many "e" characters, eg "4e4e4" "4EE4"</li>
  <li>Impossibly large/small exponents or inappropriate ones</li>
  <li>Decimal values that cannot be represented in a computer
  
  <ul>
  <li>eg, .3 + .6 == 1.0?  This bug affects most hardware, so outputs that compare decimal values should allow for a degree of error.</li>
  </ul></li>
  <li>Integer/hardware overflow.  Eg, for 32-bit integers, what happens when adding 4 billion to 4 billion?</li>
  <li>wrong use of decimal sign and thousands seperator ("," vs. ".") (MikeD)</li>
  <li>internationalisation i18n issues: In english aplications you write "12,345.67" meaning "12345.67" in german you write "12345,67" – (k3b)</li>
  <li>leading 0's don't make number octal (common javascript bug)</li>
  </ul>