title: Multiplying doubles in C++ error
body: <p>I have a seemingly simple c++ issue that's bothering me. The output of the code </p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main() {
      // your code goes here
      double c = 9.43827  * 0.105952 ; 
      cout &lt;&lt; c &lt;&lt; endl ;
      return 0;
  }
  </code></pre>
  
  <p>is 1. Just 1. I guess this is due to precision loss based on how doubles are stored in c++ but surely there must be a way in c++ to get some sort of precision (2 or 3 decimal places) in the result. </p>