title: C++ integer floor function
body: <p>I want to implement greatest integer function. [The "greatest integer function" is a <a href="http://www.google.com/search?q=greatest%20integer%20function" rel="noreferrer">quite</a> <a href="http://books.google.com/books?q=greatest+integer+function" rel="noreferrer">standard name</a> for what is also known as the floor function.]</p>
  
  <pre><code>int x = 5/3;
  </code></pre>
  
  <p>My question is with greater numbers could there be a loss of precision as 5/3 would produce a double?</p>
  
  <p>EDIT: Greatest integer function is integer less than or equal to X.
  Example:</p>
  
  <pre><code>4.5 = 4
  4 = 4
  3.2 = 3
  3 = 3
  </code></pre>
  
  <p>What I want to know is 5/3 going to produce a double? Because if so I will have loss of precision when converting to int.</p>
  
  <p>Hope this makes sense.</p>