Boost logo

Boost Users :

Subject: Re: [Boost-users] rint, the interval library and Visual Studio 2008
From: Stephan Puchegger (stephan.puchegger_at_[hidden])
Date: 2008-11-19 02:59:21


> #if BOOST_MSVC < 1400
> extern "C" { double rint(double); }
> #else
> inline double rint(double x)
> {
> _asm FLD [x] ;
> _asm FRNDINT ;
> //_asm RET ;
> }
> #endif
>
> In msvc_rounding_control.hpp.
>
> HTH, John.

Thanks John, that helped a lot and is by far more elegant than my
solution (simply add a rint implementation to my project). Perhaps your
solution should be included in the next boost version.

Best regards & thanks

Stephan


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net