title: converting float to int: rounding in complex cases (ceil() and floor() not usable)
body: <p>I want to convert a floating point value to its integer representation. As this will be used in comparisons, the default rounding mode (round_to_nearest) is not appropriate for me. As far as I know I can't specify the rounding mode to the FPU in a C++ standard compliant way (not even in C++0x). What are the other ways to accomplish that and which one of them is the most portable? I'm programming on Linux, GCC, i386 + x86-64.</p>
  
  <p>Thanks!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I'm interested in round_toward_infinity and round_toward_neg_infinity rounding modes and I want to be able select one of them each time.</p>