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::
|
24 | 24 | // as well as compatibility with C99. |
25 | 25 | // |
26 | 26 | std::complex<T> result = boost::math::acos(z); |
27 | | if(!detail::test_is_nan(result.imag()) && result.imag() <= 0) |
| 27 | if(!signbit(z.imag())) |
28 | 28 | return detail::mult_i(result); |
29 | 29 | return detail::mult_minus_i(result); |
30 | 30 | } |
diff -rup boost_1_48_0.orig/boost/math/complex/acos.hpp boost_1_48_0/boost/math/complex/acos.hpp
old
|
new
|
|
11 | 11 | #ifndef BOOST_MATH_LOG1P_INCLUDED |
12 | 12 | # include <boost/math/special_functions/log1p.hpp> |
13 | 13 | #endif |
| 14 | #include <boost/math/special_functions/sign.hpp> |
14 | 15 | #include <boost/assert.hpp> |
15 | 16 | |
16 | 17 | #ifdef BOOST_NO_STDC_NAMESPACE |
… |
… |
std::complex<T> acos(const std::complex<
|
222 | 223 | // |
223 | 224 | // Finish off by working out the sign of the result: |
224 | 225 | // |
225 | | if(z.real() < 0) |
| 226 | if(signbit(z.real())) |
226 | 227 | real = s_pi - real; |
227 | | if(z.imag() > 0) |
| 228 | if(!signbit(z.imag())) |
228 | 229 | imag = -imag; |
229 | 230 | |
230 | 231 | return std::complex<T>(real, imag); |
diff -rup boost_1_48_0.orig/boost/math/complex/asin.hpp boost_1_48_0/boost/math/complex/asin.hpp
old
|
new
|
|
11 | 11 | #ifndef BOOST_MATH_LOG1P_INCLUDED |
12 | 12 | # include <boost/math/special_functions/log1p.hpp> |
13 | 13 | #endif |
| 14 | #include <boost/math/special_functions/sign.hpp> |
14 | 15 | #include <boost/assert.hpp> |
15 | 16 | |
16 | 17 | #ifdef BOOST_NO_STDC_NAMESPACE |
… |
… |
inline std::complex<T> asin(const std::c
|
232 | 233 | // |
233 | 234 | // Finish off by working out the sign of the result: |
234 | 235 | // |
235 | | if(z.real() < 0) |
| 236 | if(signbit(z.real())) |
236 | 237 | real = -real; |
237 | | if(z.imag() < 0) |
| 238 | if(signbit(z.imag())) |
238 | 239 | imag = -imag; |
239 | 240 | |
240 | 241 | return std::complex<T>(real, imag); |
diff -rup boost_1_48_0.orig/boost/math/complex/atanh.hpp boost_1_48_0/boost/math/complex/atanh.hpp
old
|
new
|
|
12 | 12 | #ifndef BOOST_MATH_LOG1P_INCLUDED |
13 | 13 | # include <boost/math/special_functions/log1p.hpp> |
14 | 14 | #endif |
| 15 | #include <boost/math/special_functions/sign.hpp> |
15 | 16 | #include <boost/assert.hpp> |
16 | 17 | |
17 | 18 | #ifdef BOOST_NO_STDC_NAMESPACE |
… |
… |
std::complex<T> atanh(const std::complex
|
194 | 195 | } |
195 | 196 | |
196 | 197 | real /= four; |
197 | | if(z.real() < 0) |
| 198 | if(signbit(z.real())) |
198 | 199 | real = -real; |
199 | 200 | |
200 | 201 | // |
… |
… |
std::complex<T> atanh(const std::complex
|
234 | 235 | imag = std::atan2(two*y, 1 - x*x); |
235 | 236 | } |
236 | 237 | imag /= two; |
237 | | if(z.imag() < 0) |
| 238 | if(signbit(z.imag())) |
238 | 239 | imag = -imag; |
239 | 240 | } |
240 | 241 | return std::complex<T>(real, imag); |