Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71432 - in trunk: boost/math/special_functions libs/math/test/compile_test
From: john_at_[hidden]
Date: 2011-04-23 04:17:13


Author: johnmaddock
Date: 2011-04-23 04:17:10 EDT (Sat, 23 Apr 2011)
New Revision: 71432
URL: http://svn.boost.org/trac/boost/changeset/71432

Log:
Fix remaining Intel regressions.
Add prototypes to fwd header.
Add new functions to the concept checks.
Text files modified:
   trunk/boost/math/special_functions/math_fwd.hpp | 17 ++++++++++++++++-
   trunk/boost/math/special_functions/sign.hpp | 2 +-
   trunk/libs/math/test/compile_test/instantiate.hpp | 13 ++++++++-----
   3 files changed, 25 insertions(+), 7 deletions(-)

Modified: trunk/boost/math/special_functions/math_fwd.hpp
==============================================================================
--- trunk/boost/math/special_functions/math_fwd.hpp (original)
+++ trunk/boost/math/special_functions/math_fwd.hpp 2011-04-23 04:17:10 EDT (Sat, 23 Apr 2011)
@@ -641,6 +641,18 @@
    template <class T>
    bool isnormal BOOST_NO_MACRO_EXPAND(T t);
 
+ template<class T>
+ int signbit BOOST_NO_MACRO_EXPAND(T x);
+
+ template <class T>
+ int sign BOOST_NO_MACRO_EXPAND(const T& z);
+
+ template <class T>
+ T copysign BOOST_NO_MACRO_EXPAND(const T& x, const T& y);
+
+ template <class T>
+ T changesign BOOST_NO_MACRO_EXPAND(const T& z);
+
    // Exponential integrals:
    namespace detail{
 
@@ -880,7 +892,6 @@
    inline typename boost::math::tools::promote_args<RT>::type falling_factorial(RT x, unsigned n){ return boost::math::falling_factorial(x, n, Policy()); }\
    template <class RT>\
    inline typename boost::math::tools::promote_args<RT>::type rising_factorial(RT x, unsigned n){ return boost::math::rising_factorial(x, n, Policy()); }\
- using boost::math::fpclassify;\
 \
    template <class RT>\
    inline typename boost::math::tools::promote_args<RT>::type tgamma(RT z){ return boost::math::tgamma(z, Policy()); }\
@@ -1003,6 +1014,10 @@
    using boost::math::isinf;\
    using boost::math::isnan;\
    using boost::math::isnormal;\
+ using boost::math::signbit;\
+ using boost::math::sign;\
+ using boost::math::copysign;\
+ using boost::math::changesign;\
    \
    template <class T, class U>\
    inline typename boost::math::tools::promote_args<T,U>::type expint(T const& z, U const& u)\

Modified: trunk/boost/math/special_functions/sign.hpp
==============================================================================
--- trunk/boost/math/special_functions/sign.hpp (original)
+++ trunk/boost/math/special_functions/sign.hpp 2011-04-23 04:17:10 EDT (Sat, 23 Apr 2011)
@@ -120,7 +120,7 @@
    return (z == 0) ? 0 : (boost::math::signbit)(z) ? -1 : 1;
 }
 
-template<class T> T (changesign)(T x)
+template<class T> T (changesign)(const T& x)
 { //!< \brief return unchanged binary pattern of x, except for change of sign bit.
    typedef typename detail::fp_traits<T>::sign_change_type traits;
    typedef typename traits::method method;

Modified: trunk/libs/math/test/compile_test/instantiate.hpp
==============================================================================
--- trunk/libs/math/test/compile_test/instantiate.hpp (original)
+++ trunk/libs/math/test/compile_test/instantiate.hpp 2011-04-23 04:17:10 EDT (Sat, 23 Apr 2011)
@@ -179,6 +179,10 @@
    (boost::math::isnormal)(v1);
    (boost::math::isnan)(v1);
    (boost::math::isinf)(v1);
+ (boost::math::signbit)(v1);
+ (boost::math::copysign)(v1, v2);
+ (boost::math::changesign)(v1);
+ (boost::math::sign)(v1);
    boost::math::log1p(v1);
    boost::math::expm1(v1);
    boost::math::cbrt(v1);
@@ -298,11 +302,6 @@
    boost::math::ibetac_invb(v1, v2, v3, pol);
    boost::math::gamma_p_derivative(v2, v3, pol);
    boost::math::ibeta_derivative(v1, v2, v3, pol);
- (boost::math::fpclassify)(v1);
- (boost::math::isfinite)(v1);
- (boost::math::isnormal)(v1);
- (boost::math::isnan)(v1);
- (boost::math::isinf)(v1);
    boost::math::log1p(v1, pol);
    boost::math::expm1(v1, pol);
    boost::math::cbrt(v1, pol);
@@ -428,6 +427,10 @@
    (test::isnormal)(v1);
    (test::isnan)(v1);
    (test::isinf)(v1);
+ (test::signbit)(v1);
+ (test::copysign)(v1, v2);
+ (test::changesign)(v1);
+ (test::sign)(v1);
    test::log1p(v1);
    test::expm1(v1);
    test::cbrt(v1);


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