title: Unknown behavior of Round function in C++
body: <pre><code>#include &lt;iostream&gt;
  
  int main()
  {
      double number1 = 1.4999999999999999;
      double number2 = 1.499999999999999;
  
  std::cout &lt;&lt; &quot;NUMBER 1 =&gt; ROUND (&quot; &lt;&lt; number1 &lt;&lt; &quot;) = &quot; &lt;&lt; round(number1) &lt;&lt; std::endl;
  std::cout &lt;&lt; &quot;NUMBER 2 =&gt; ROUND (&quot; &lt;&lt; number2 &lt;&lt; &quot;) = &quot; &lt;&lt; round(number2) &lt;&lt; std::endl;
  
  std::cin.get();
  }
  </code></pre>
  <p>Output for above code is as follows: -</p>
  <p><strong>NUMBER 1 => ROUND (1.5) = 2</strong></p>
  <p><strong>NUMBER 2 => ROUND (1.5) = 1</strong></p>
  <p>I am unclear how my number1 and number2 are changing to 1.5 and if so they're changing to 1.5 then why two different output's of round function for same number.</p>
  <p>Tried using long double still same output</p>
  <p>I am using Visual Studio 2019, will that make any difference?</p>