Ticket #6171: boost.patch

File boost.patch, 3.1 KB (added by Richard B. Kreckel <kreckel@…>, 11 years ago)

patch

  • boost/math/complex/acosh.hpp

    diff -rup boost_1_48_0.orig/boost/math/complex/acosh.hpp boost_1_48_0/boost/math/complex/acosh.hpp
    old new inline std::complex<T> acosh(const std::  
    2424   // as well as compatibility with C99.
    2525   //
    2626   std::complex<T> result = boost::math::acos(z);
    27    if(!detail::test_is_nan(result.imag()) && result.imag() <= 0)
     27   if(!signbit(z.imag()))
    2828      return detail::mult_i(result);
    2929   return detail::mult_minus_i(result);
    3030}
  • boost/math/complex/acos.hpp

    diff -rup boost_1_48_0.orig/boost/math/complex/acos.hpp boost_1_48_0/boost/math/complex/acos.hpp
    old new  
    1111#ifndef BOOST_MATH_LOG1P_INCLUDED
    1212#  include <boost/math/special_functions/log1p.hpp>
    1313#endif
     14#include <boost/math/special_functions/sign.hpp>
    1415#include <boost/assert.hpp>
    1516
    1617#ifdef BOOST_NO_STDC_NAMESPACE
    std::complex<T> acos(const std::complex<  
    222223   //
    223224   // Finish off by working out the sign of the result:
    224225   //
    225    if(z.real() < 0)
     226   if(signbit(z.real()))
    226227      real = s_pi - real;
    227    if(z.imag() > 0)
     228   if(!signbit(z.imag()))
    228229      imag = -imag;
    229230
    230231   return std::complex<T>(real, imag);
  • boost/math/complex/asin.hpp

    diff -rup boost_1_48_0.orig/boost/math/complex/asin.hpp boost_1_48_0/boost/math/complex/asin.hpp
    old new  
    1111#ifndef BOOST_MATH_LOG1P_INCLUDED
    1212#  include <boost/math/special_functions/log1p.hpp>
    1313#endif
     14#include <boost/math/special_functions/sign.hpp>
    1415#include <boost/assert.hpp>
    1516
    1617#ifdef BOOST_NO_STDC_NAMESPACE
    inline std::complex<T> asin(const std::c  
    232233   //
    233234   // Finish off by working out the sign of the result:
    234235   //
    235    if(z.real() < 0)
     236   if(signbit(z.real()))
    236237      real = -real;
    237    if(z.imag() < 0)
     238   if(signbit(z.imag()))
    238239      imag = -imag;
    239240
    240241   return std::complex<T>(real, imag);
  • boost/math/complex/atanh.hpp

    diff -rup boost_1_48_0.orig/boost/math/complex/atanh.hpp boost_1_48_0/boost/math/complex/atanh.hpp
    old new  
    1212#ifndef BOOST_MATH_LOG1P_INCLUDED
    1313#  include <boost/math/special_functions/log1p.hpp>
    1414#endif
     15#include <boost/math/special_functions/sign.hpp>
    1516#include <boost/assert.hpp>
    1617
    1718#ifdef BOOST_NO_STDC_NAMESPACE
    std::complex<T> atanh(const std::complex  
    194195      }
    195196     
    196197      real /= four;
    197       if(z.real() < 0)
     198      if(signbit(z.real()))
    198199         real = -real;
    199200
    200201      //
    std::complex<T> atanh(const std::complex  
    234235            imag = std::atan2(two*y, 1 - x*x);
    235236      }
    236237      imag /= two;
    237       if(z.imag() < 0)
     238      if(signbit(z.imag()))
    238239         imag = -imag;
    239240   }
    240241   return std::complex<T>(real, imag);