title: C++ Any way to print maximum double (8 bytes) value with full precision without changing it to long long?
body: <p>I have an issue when printing the value with 'cout'. I would like to see value "9223372036854775807" in console but I just keep on getting "9223372036854775800" and same happens with negative values. I also want user to enter this as a maximum value and want to keep decimal places.</p>
  
  <p>--------------- these will be the minimum and maximum value</p>
  
  <pre><code>double al = scnd_num_min(num1, Oprt);
  al = al * (-1);
  double ah = scnd_num_max(num1, Oprt);
  </code></pre>
  
  <p>-------------- and this is where I print these values</p>
  
  <pre><code>cout &lt;&lt; "Please enter a value within a range of: " &lt;&lt; "\n" &lt;&lt; fixed &lt;&lt; al;
  cout &lt;&lt; " and " &lt;&lt; ah &lt;&lt; " : ";
  </code></pre>
  
  <p>And that is one function to get value:</p>
  
  <pre><code>    double scnd_num_max(double num1, char Oprt)
      {
      double max1 = 9223372036854775807;
      double max2 = 9223372036854775806;
      double min1 = -9223372036854775806;
      switch(Oprt)
      {
      case '+':
          if (num1 &lt;= 0)
              return max1;
          else
              return (max1 - num1);
      case '-':
          if (num1 &gt;= -1)
              return max1;
          else
              return ((max1 - (num1 * (-1)))+1);
      case '*':
          if ((num1 &lt; min1) || (num1 &gt; max2))
              return 1;
          else if (num1 == 0)
              return max2;
          else if (num1 &gt; 0)
              return (max2 / num1);
          else
              return (max2 / (num1 * (-1)));
      case '/':
          return max2;
      }
  }
  </code></pre>
  
  <p>Pretty same is for negative value.</p>