Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2008-07-14 11:26:45


Author: johnmaddock
Date: 2008-07-14 11:26:44 EDT (Mon, 14 Jul 2008)
New Revision: 47420
URL: http://svn.boost.org/trac/boost/changeset/47420

Log:
Fix a few regressions with compiler/platform specific workarounds.
Text files modified:
   trunk/boost/math/concepts/real_concept.hpp | 2 +-
   trunk/boost/math/tools/config.hpp | 2 +-
   trunk/libs/math/src/tr1/fpclassify.cpp | 12 ++++++------
   trunk/libs/math/src/tr1/fpclassifyf.cpp | 12 ++++++------
   trunk/libs/math/src/tr1/fpclassifyl.cpp | 12 ++++++------
   trunk/libs/math/test/test_tr1.cpp | 6 +++---
   6 files changed, 23 insertions(+), 23 deletions(-)

Modified: trunk/boost/math/concepts/real_concept.hpp
==============================================================================
--- trunk/boost/math/concepts/real_concept.hpp (original)
+++ trunk/boost/math/concepts/real_concept.hpp 2008-07-14 11:26:44 EDT (Mon, 14 Jul 2008)
@@ -299,7 +299,7 @@
    is >> v;
    a = v;
    return is;
-#elif defined(__SGI_STL_PORT)
+#elif defined(__SGI_STL_PORT) || defined(_RWSTD_VER) || defined(__LIBCOMO__)
    std::string s;
    real_concept_base_type d;
    is >> s;

Modified: trunk/boost/math/tools/config.hpp
==============================================================================
--- trunk/boost/math/tools/config.hpp (original)
+++ trunk/boost/math/tools/config.hpp 2008-07-14 11:26:44 EDT (Mon, 14 Jul 2008)
@@ -60,7 +60,7 @@
 # define BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
 #endif
 
-#ifdef BOOST_MSVC
+#if defined(BOOST_MSVC) && !defined(_WIN32_WCE)
    // Better safe than sorry, our tests don't support hardware exceptions:
 # define BOOST_MATH_CONTROL_FP _control87(MCW_EM,MCW_EM)
 #endif

Modified: trunk/libs/math/src/tr1/fpclassify.cpp
==============================================================================
--- trunk/libs/math/src/tr1/fpclassify.cpp (original)
+++ trunk/libs/math/src/tr1/fpclassify.cpp 2008-07-14 11:26:44 EDT (Mon, 14 Jul 2008)
@@ -15,32 +15,32 @@
 
 template<> bool BOOST_MATH_TR1_DECL signbit<double> NO_MACRO_EXPAND(double x)
 {
- return static_cast<bool>(boost::math::signbit(x));
+ return static_cast<bool>((boost::math::signbit)(x));
 }
 
 template<> int BOOST_MATH_TR1_DECL fpclassify<double> NO_MACRO_EXPAND(double x)
 {
- return boost::math::fpclassify(x);
+ return (boost::math::fpclassify)(x);
 }
 
 template<> bool BOOST_MATH_TR1_DECL isfinite<double> NO_MACRO_EXPAND(double x)
 {
- return boost::math::isfinite(x);
+ return (boost::math::isfinite)(x);
 }
 
 template<> bool BOOST_MATH_TR1_DECL isinf<double> NO_MACRO_EXPAND(double x)
 {
- return boost::math::isinf(x);
+ return (boost::math::isinf)(x);
 }
 
 template<> bool BOOST_MATH_TR1_DECL isnan<double> NO_MACRO_EXPAND(double x)
 {
- return boost::math::isnan(x);
+ return (boost::math::isnan)(x);
 }
 
 template<> bool BOOST_MATH_TR1_DECL isnormal<double> NO_MACRO_EXPAND(double x)
 {
- return boost::math::isnormal(x);
+ return (boost::math::isnormal)(x);
 }
 
 }}}

Modified: trunk/libs/math/src/tr1/fpclassifyf.cpp
==============================================================================
--- trunk/libs/math/src/tr1/fpclassifyf.cpp (original)
+++ trunk/libs/math/src/tr1/fpclassifyf.cpp 2008-07-14 11:26:44 EDT (Mon, 14 Jul 2008)
@@ -15,32 +15,32 @@
 
 template<> bool BOOST_MATH_TR1_DECL signbit<float> NO_MACRO_EXPAND(float x)
 {
- return static_cast<bool>(boost::math::signbit(x));
+ return static_cast<bool>((boost::math::signbit)(x));
 }
 
 template<> int BOOST_MATH_TR1_DECL fpclassify<float> NO_MACRO_EXPAND(float x)
 {
- return boost::math::fpclassify(x);
+ return (boost::math::fpclassify)(x);
 }
 
 template<> bool BOOST_MATH_TR1_DECL isfinite<float> NO_MACRO_EXPAND(float x)
 {
- return boost::math::isfinite(x);
+ return (boost::math::isfinite)(x);
 }
 
 template<> bool BOOST_MATH_TR1_DECL isinf<float> NO_MACRO_EXPAND(float x)
 {
- return boost::math::isinf(x);
+ return (boost::math::isinf)(x);
 }
 
 template<> bool BOOST_MATH_TR1_DECL isnan<float> NO_MACRO_EXPAND(float x)
 {
- return boost::math::isnan(x);
+ return (boost::math::isnan)(x);
 }
 
 template<> bool BOOST_MATH_TR1_DECL isnormal<float> NO_MACRO_EXPAND(float x)
 {
- return boost::math::isnormal(x);
+ return (boost::math::isnormal)(x);
 }
 
 }}}

Modified: trunk/libs/math/src/tr1/fpclassifyl.cpp
==============================================================================
--- trunk/libs/math/src/tr1/fpclassifyl.cpp (original)
+++ trunk/libs/math/src/tr1/fpclassifyl.cpp 2008-07-14 11:26:44 EDT (Mon, 14 Jul 2008)
@@ -15,32 +15,32 @@
 
 template<> bool BOOST_MATH_TR1_DECL signbit<long double> NO_MACRO_EXPAND(long double x)
 {
- return static_cast<bool>(boost::math::signbit(x));
+ return static_cast<bool>((boost::math::signbit)(x));
 }
 
 template<> int BOOST_MATH_TR1_DECL fpclassify<long double> NO_MACRO_EXPAND(long double x)
 {
- return boost::math::fpclassify(x);
+ return (boost::math::fpclassify)(x);
 }
 
 template<> bool BOOST_MATH_TR1_DECL isfinite<long double> NO_MACRO_EXPAND(long double x)
 {
- return boost::math::isfinite(x);
+ return (boost::math::isfinite)(x);
 }
 
 template<> bool BOOST_MATH_TR1_DECL isinf<long double> NO_MACRO_EXPAND(long double x)
 {
- return boost::math::isinf(x);
+ return (boost::math::isinf)(x);
 }
 
 template<> bool BOOST_MATH_TR1_DECL isnan<long double> NO_MACRO_EXPAND(long double x)
 {
- return boost::math::isnan(x);
+ return (boost::math::isnan)(x);
 }
 
 template<> bool BOOST_MATH_TR1_DECL isnormal<long double> NO_MACRO_EXPAND(long double x)
 {
- return boost::math::isnormal(x);
+ return (boost::math::isnormal)(x);
 }
 
 }}}

Modified: trunk/libs/math/test/test_tr1.cpp
==============================================================================
--- trunk/libs/math/test/test_tr1.cpp (original)
+++ trunk/libs/math/test/test_tr1.cpp 2008-07-14 11:26:44 EDT (Mon, 14 Jul 2008)
@@ -557,7 +557,7 @@
    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(800) / 1024, static_cast<float>(1e-05)), static_cast<float>(9.999999999898274739584436515967055859383969942432E-6), eps * 5000);
    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(100) / 1024, static_cast<float>(1e+05)), static_cast<float>(99761.153306972066658135668386691227343323331995888), eps * 5000);
    BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(-0.5), static_cast<float>(1e+10)), static_cast<float>(9.3421545766487137036576748555295222252286528414669e9), eps * 5000);
- BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(400) / 1024, ldexpf(static_cast<float>(1), 66)), static_cast<float>(7.0886102721911705466476846969992069994308167515242e19), eps * 5000);
+ BOOST_CHECK_CLOSE(tr1::ellint_2(static_cast<float>(400) / 1024, static_cast<float>(ldexp(static_cast<double>(1), 66))), static_cast<float>(7.0886102721911705466476846969992069994308167515242e19), eps * 5000);
 
    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0), static_cast<float>(1), static_cast<float>(-1)), static_cast<float>(-1.557407724654902230506974807458360173087), eps * 5000);
    BOOST_CHECK_CLOSE(tr1::ellint_3(static_cast<float>(0.4), static_cast<float>(0), static_cast<float>(-4)), static_cast<float>(-4.153623371196831087495427530365430979011), eps * 5000);
@@ -1230,7 +1230,7 @@
    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(10240L)/1024L, static_cast<long double>(1L)/1024L), static_cast<long double>(2.35522579263922076203415803966825431039900000000993410734978e38L), eps * 5000L);
    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(10240L)/1024L, static_cast<long double>(10L)), static_cast<long double>(0.00161425530039067002345725193091329085443750382929208307802221L), eps * 5000L);
    BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(144793L)/1024L, static_cast<long double>(100L)), static_cast<long double>(1.39565245860302528069481472855619216759142225046370312329416e-6L), eps * 5000L);
- BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(144793L)/1024L, static_cast<long double>(200L)), static_cast<long double>(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 5000L);
+ BOOST_CHECK_CLOSE(tr1::cyl_bessel_kl(static_cast<long double>(144793L)/1024L, static_cast<long double>(200L)), static_cast<long double>(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 7000L);
 
    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(0.5L), static_cast<long double>(1L) / (1024*1024L)), static_cast<long double>(-817.033790261762580469303126467917092806755460418223776544122L), eps * 5000L);
    BOOST_CHECK_CLOSE(tr1::cyl_neumannl(static_cast<long double>(5.5L), static_cast<long double>(3.125L)), static_cast<long double>(-2.61489440328417468776474188539366752698192046890955453259866L), eps * 5000L);
@@ -1471,7 +1471,7 @@
    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(10240L)/1024L, static_cast<long double>(1L)/1024L), static_cast<long double>(2.35522579263922076203415803966825431039900000000993410734978e38L), eps * 5000L);
    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(10240L)/1024L, static_cast<long double>(10L)), static_cast<long double>(0.00161425530039067002345725193091329085443750382929208307802221L), eps * 5000L);
    BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(144793L)/1024L, static_cast<long double>(100L)), static_cast<long double>(1.39565245860302528069481472855619216759142225046370312329416e-6L), eps * 5000L);
- BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(144793L)/1024L, static_cast<long double>(200L)), static_cast<long double>(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 5000L);
+ BOOST_CHECK_CLOSE(tr1::cyl_bessel_k(static_cast<long double>(144793L)/1024L, static_cast<long double>(200L)), static_cast<long double>(9.11950412043225432171915100042647230802198254567007382956336e-68L), eps * 7000L);
 
    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(0.5L), static_cast<long double>(1L) / (1024*1024L)), static_cast<long double>(-817.033790261762580469303126467917092806755460418223776544122L), eps * 5000L);
    BOOST_CHECK_CLOSE(tr1::cyl_neumann(static_cast<long double>(5.5L), static_cast<long double>(3.125L)), static_cast<long double>(-2.61489440328417468776474188539366752698192046890955453259866L), eps * 5000L);


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