Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59350 - in trunk/boost/numeric/interval: . detail
From: marshall_at_[hidden]
Date: 2010-01-29 13:01:35


Author: marshall
Date: 2010-01-29 13:01:34 EST (Fri, 29 Jan 2010)
New Revision: 59350
URL: http://svn.boost.org/trac/boost/changeset/59350

Log:
Applied patches to fix #2512 and #2513
Text files modified:
   trunk/boost/numeric/interval/detail/msvc_rounding_control.hpp | 9 +++++++++
   trunk/boost/numeric/interval/transc.hpp | 2 +-
   2 files changed, 10 insertions(+), 1 deletions(-)

Modified: trunk/boost/numeric/interval/detail/msvc_rounding_control.hpp
==============================================================================
--- trunk/boost/numeric/interval/detail/msvc_rounding_control.hpp (original)
+++ trunk/boost/numeric/interval/detail/msvc_rounding_control.hpp 2010-01-29 13:01:34 EST (Fri, 29 Jan 2010)
@@ -25,7 +25,16 @@
 namespace interval_lib {
 namespace detail {
 
+#if BOOST_MSVC < 1400
 extern "C" { double rint(double); }
+#else
+inline double rint(double x)
+{
+_asm FLD [x] ;
+_asm FRNDINT ;
+//_asm RET ;
+}
+#endif
 
 struct x86_rounding
 {

Modified: trunk/boost/numeric/interval/transc.hpp
==============================================================================
--- trunk/boost/numeric/interval/transc.hpp (original)
+++ trunk/boost/numeric/interval/transc.hpp 2010-01-29 13:01:34 EST (Fri, 29 Jan 2010)
@@ -176,7 +176,7 @@
   else if (!interval_lib::user::is_neg(x.lower()))
     return I(rnd.cosh_down(x.lower()), rnd.cosh_up(x.upper()), true);
   else
- return I(static_cast<T>(0), rnd.cosh_up(-x.lower() > x.upper() ? x.lower() : x.upper()), true);
+ return I(static_cast<T>(1), rnd.cosh_up(-x.lower() > x.upper() ? x.lower() : x.upper()), true);
 }
 
 template<class T, class Policies> inline


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk