diff -up boost_1_54_0/boost/multiprecision/detail/functions/constants.hpp~ boost_1_54_0/boost/multiprecision/detail/functions/constants.hpp
|
old
|
new
|
template <class T>
|
| 81 | 81 | void calc_e(T& result, unsigned digits) |
| 82 | 82 | { |
| 83 | 83 | typedef typename mpl::front<typename T::unsigned_types>::type ui_type; |
| 84 | | typedef typename mpl::front<typename T::float_types>::type real_type; |
| 85 | 84 | // |
| 86 | 85 | // 1100 digits in string form: |
| 87 | 86 | // |
diff -up boost_1_54_0/boost/multiprecision/detail/functions/pow.hpp~ boost_1_54_0/boost/multiprecision/detail/functions/pow.hpp
|
old
|
new
|
void hyp1F0(T& H1F0, const T& a, const T
|
| 142 | 142 | // There are no checks on input range or parameter boundaries. |
| 143 | 143 | |
| 144 | 144 | typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type; |
| 145 | | typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; |
| 146 | | typedef typename T::exponent_type exp_type; |
| 147 | | typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; |
| 148 | | typedef typename mpl::front<typename T::float_types>::type fp_type; |
| 149 | 145 | |
| 150 | 146 | BOOST_ASSERT(&H1F0 != &x); |
| 151 | 147 | BOOST_ASSERT(&H1F0 != &a); |
| … |
… |
void eval_exp(T& result, const T& x)
|
| 200 | 196 | typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type; |
| 201 | 197 | typedef typename T::exponent_type exp_type; |
| 202 | 198 | typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; |
| 203 | | typedef typename boost::multiprecision::detail::canonical<float, T>::type float_type; |
| 204 | 199 | |
| 205 | 200 | // Handle special arguments. |
| 206 | 201 | int type = eval_fpclassify(x); |
| … |
… |
void eval_log(T& result, const T& arg)
|
| 326 | 321 | // then let y = x - 1 and compute: |
| 327 | 322 | // log(x) = log(2) * n + log1p(1 + y) |
| 328 | 323 | // |
| 329 | | typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type; |
| 330 | 324 | typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; |
| 331 | 325 | typedef typename T::exponent_type exp_type; |
| 332 | 326 | typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; |
| … |
… |
inline void eval_pow(T& result, const T&
|
| 409 | 403 | { |
| 410 | 404 | BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The pow function is only valid for floating point types."); |
| 411 | 405 | typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type; |
| 412 | | typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; |
| 413 | | typedef typename T::exponent_type exp_type; |
| 414 | | typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; |
| 415 | 406 | typedef typename mpl::front<typename T::float_types>::type fp_type; |
| 416 | 407 | |
| 417 | 408 | if((&result == &x) || (&result == &a)) |
| … |
… |
namespace detail{
|
| 595 | 586 | template <class T> |
| 596 | 587 | void sinhcosh(const T& x, T* p_sinh, T* p_cosh) |
| 597 | 588 | { |
| 598 | | typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type; |
| 599 | 589 | typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type; |
| 600 | | typedef typename T::exponent_type exp_type; |
| 601 | | typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; |
| 602 | 590 | typedef typename mpl::front<typename T::float_types>::type fp_type; |
| 603 | 591 | |
| 604 | 592 | switch(eval_fpclassify(x)) |
diff -up boost_1_54_0/boost/multiprecision/detail/functions/trig.hpp~ boost_1_54_0/boost/multiprecision/detail/functions/trig.hpp
|
old
|
new
|
void hyp0F1(T& result, const T& b, const
|
| 17 | 17 | { |
| 18 | 18 | typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type; |
| 19 | 19 | typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; |
| 20 | | typedef typename T::exponent_type exp_type; |
| 21 | | typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; |
| 22 | | typedef typename mpl::front<typename T::float_types>::type fp_type; |
| 23 | 20 | |
| 24 | 21 | // Compute the series representation of Hypergeometric0F1 taken from |
| 25 | 22 | // http://functions.wolfram.com/HypergeometricFunctions/Hypergeometric0F1/06/01/01/ |
| … |
… |
void eval_sin(T& result, const T& x)
|
| 82 | 79 | |
| 83 | 80 | typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type; |
| 84 | 81 | typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; |
| 85 | | typedef typename T::exponent_type exp_type; |
| 86 | | typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; |
| 87 | 82 | typedef typename mpl::front<typename T::float_types>::type fp_type; |
| 88 | 83 | |
| 89 | 84 | switch(eval_fpclassify(x)) |
| … |
… |
void eval_cos(T& result, const T& x)
|
| 228 | 223 | |
| 229 | 224 | typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type; |
| 230 | 225 | typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; |
| 231 | | typedef typename T::exponent_type exp_type; |
| 232 | | typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; |
| 233 | 226 | typedef typename mpl::front<typename T::float_types>::type fp_type; |
| 234 | 227 | |
| 235 | 228 | switch(eval_fpclassify(x)) |
| … |
… |
void hyp2F1(T& result, const T& a, const
|
| 381 | 374 | // Abramowitz and Stegun 15.1.1. |
| 382 | 375 | // There are no checks on input range or parameter boundaries. |
| 383 | 376 | |
| 384 | | typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type; |
| 385 | 377 | typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; |
| 386 | | typedef typename T::exponent_type exp_type; |
| 387 | | typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; |
| 388 | | typedef typename mpl::front<typename T::float_types>::type fp_type; |
| 389 | 378 | |
| 390 | 379 | T x_pow_n_div_n_fact(x); |
| 391 | 380 | T pochham_a (a); |
| … |
… |
template <class T>
|
| 443 | 432 | void eval_asin(T& result, const T& x) |
| 444 | 433 | { |
| 445 | 434 | BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The asin function is only valid for floating point types."); |
| 446 | | typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type; |
| 447 | 435 | typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; |
| 448 | | typedef typename T::exponent_type exp_type; |
| 449 | | typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; |
| 450 | 436 | typedef typename mpl::front<typename T::float_types>::type fp_type; |
| 451 | 437 | |
| 452 | 438 | if(&result == &x) |
| … |
… |
void eval_atan(T& result, const T& x)
|
| 597 | 583 | BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The atan function is only valid for floating point types."); |
| 598 | 584 | typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type; |
| 599 | 585 | typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; |
| 600 | | typedef typename T::exponent_type exp_type; |
| 601 | | typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; |
| 602 | 586 | typedef typename mpl::front<typename T::float_types>::type fp_type; |
| 603 | 587 | |
| 604 | 588 | switch(eval_fpclassify(x)) |
| … |
… |
void eval_atan2(T& result, const T& y, c
|
| 699 | 683 | return; |
| 700 | 684 | } |
| 701 | 685 | |
| 702 | | typedef typename boost::multiprecision::detail::canonical<boost::int32_t, T>::type si_type; |
| 703 | 686 | typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type; |
| 704 | | typedef typename T::exponent_type exp_type; |
| 705 | | typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type; |
| 706 | | typedef typename mpl::front<typename T::float_types>::type fp_type; |
| 707 | 687 | |
| 708 | 688 | switch(eval_fpclassify(y)) |
| 709 | 689 | { |
diff -up boost_1_54_0/boost/multiprecision/detail/generic_interconvert.hpp~ boost_1_54_0/boost/multiprecision/detail/generic_interconvert.hpp
|
old
|
new
|
void generic_interconvert(To& to, const
|
| 191 | 191 | template <class To, class From> |
| 192 | 192 | void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& /*to_type*/, const mpl::int_<number_kind_rational>& /*from_type*/) |
| 193 | 193 | { |
| 194 | | typedef typename component_type<number<From> >::type from_component_type; |
| 195 | 194 | typedef typename component_type<number<To> >::type to_component_type; |
| 196 | 195 | |
| 197 | 196 | number<From> t(from); |