title: conversion from double to unsigned int
body: <p>I am facing a problem with the conversion of value from Double to int. I try to run the following code :</p>
  
  <pre><code>int main()
  {
      double val_d= 6.25e-05;
      cout &lt;&lt; (1/val_d) &lt;&lt; endl;
      unsigned int val_ui = (unsigned int ) (1/val_d);
      cout &lt;&lt; val_ui &lt;&lt; endl;
  }
  </code></pre>
  
  <p>conversion from double to int may remove decimal part but integer part should remain
  as it is ?</p>
  
  <p>The output i get is : 
  16000
  15999</p>
  
  <p>so why is the o/p different here ?
  This is happening only on fedora. On windows and Ubuntu it works fine. ( Both output are 16000)</p>
  
  <p>I tweaked the above code and got the following results :</p>
  
  <pre><code>int main()
  {
    double val_d= 6.25e-05;
    cout &lt;&lt; (1/val_d) &lt;&lt; endl;
    double val_intermediate =  (1/val_d) ;
    cout &lt;&lt; val_intermediate &lt;&lt; endl;
    unsigned int val_ui = (unsigned int ) val_intermediate;
    cout &lt;&lt; val_ui &lt;&lt; endl;
  
  }
  </code></pre>
  
  <p>NEW OUTPUT is
  16000
  16000
  16000</p>