title: scanf is successful but the value stored is not right for some large floating point numbers
body: <p>Inputting large numbers for the below code results in <code>scanf</code> being successful although the value isn't being stored correctly.</p>
  
  <pre><code>printf("\nDouble max: %f\n", DBL_MAX);
  printf("\nFloat max: %f\n", FLT_MAX);
  printf("\nPlease insert root1 data: ");
  float input1;
  scanResult = scanf("%f", &amp;input1);
  printf("\nScan Result is %d\n", scanResult);
  
  double input2;
  printf("\nPlease insert root2 data: ");
  scanResult = scanf("%lf", &amp;input2);
  printf("\nScan Result is %d\n", scanResult);
  
  printf("%f", input1);
  printf("%f", input2);
  </code></pre>
  
  <p>Output:</p>
  
  <pre class="lang-none prettyprint-override"><code>Double max: 17976931348623157000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000
  0.000000
  
  Float max: 340282346638528860000000000000000000000.000000
  
  Please insert root1 data: 1872389723948273985723984756982375698374568
  
  Scan Result is 1
  
  Please insert root2 data: 928734812348721834.2348275
  
  Scan Result is 1
  
  
  1.#INF00
  
  928734812348721790.000000
  </code></pre>
  
  <p>So my questions are:</p>
  
  <ol>
  <li><p><strong>First scan:</strong> Why does <code>scanf</code> still say the scan result is 1, when you can see that the value isn't stored properly?</p></li>
  <li><p><strong>Second scan:</strong> Why does it do that rounding it does, and how can I fix it?</p></li>
  <li><p><strong>In general:</strong> We can see, by the number of 0's, that the <code>DBL_MAX</code> and <code>FLT_MAX</code> are much larger than the input I gave. So why doesn't it store the input correctly?</p></li>
  </ol>