diff options
author | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-12-11 18:55:56 +0900 |
commit | 08c1e93fa36a49f49325a07fe91ff92c964c2b6c (patch) | |
tree | 7a7053ceb8874b28ec4b868d4c49b500008a102e /boost/math/special_functions/hankel.hpp | |
parent | bb4dd8289b351fae6b55e303f189127a394a1edd (diff) | |
download | boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.gz boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.bz2 boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.zip |
Imported Upstream version 1.57.0upstream/1.57.0
Diffstat (limited to 'boost/math/special_functions/hankel.hpp')
-rw-r--r-- | boost/math/special_functions/hankel.hpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/boost/math/special_functions/hankel.hpp b/boost/math/special_functions/hankel.hpp index bc3fc2d742..4266ef808c 100644 --- a/boost/math/special_functions/hankel.hpp +++ b/boost/math/special_functions/hankel.hpp @@ -7,6 +7,7 @@ #ifndef BOOST_MATH_HANKEL_HPP #define BOOST_MATH_HANKEL_HPP +#include <boost/math/special_functions/math_fwd.hpp> #include <boost/math/special_functions/bessel.hpp> namespace boost{ namespace math{ @@ -28,7 +29,7 @@ std::complex<T> hankel_imp(T v, T x, const bessel_no_int_tag&, const Policy& pol std::complex<T> j_result, y_result; if(isint_v) { - int s = (iround(j) & 1) ? -1 : 1; + int s = (iround(v) & 1) ? -1 : 1; j_result = j * s; y_result = T(s) * (y - (2 / constants::pi<T>()) * (log(-x) - log(cx)) * j); } @@ -83,7 +84,7 @@ template <class T, class Policy> inline std::complex<T> hankel_imp(int v, T x, const bessel_int_tag&, const Policy& pol, int sign) { BOOST_MATH_STD_USING - if((std::abs(v < 200)) && (x > 0)) + if((std::abs(v) < 200) && (x > 0)) return std::complex<T>(bessel_jn(v, x, pol), sign * bessel_yn(v, x, pol)); return hankel_imp(static_cast<T>(v), x, bessel_no_int_tag(), pol, sign); } @@ -130,7 +131,7 @@ inline std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >: } template <class T1, class T2, class Policy> -inline std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_1(T1 v, T2 x, const Policy& pol) +inline std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_1(T1 v, T2 x, const Policy&) { BOOST_FPU_EXCEPTION_GUARD typedef typename detail::bessel_traits<T1, T2, Policy>::result_type result_type; @@ -152,7 +153,7 @@ inline std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >: } template <class T1, class T2, class Policy> -inline std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_2(T1 v, T2 x, const Policy& pol) +inline std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_2(T1 v, T2 x, const Policy&) { BOOST_FPU_EXCEPTION_GUARD typedef typename detail::bessel_traits<T1, T2, Policy>::result_type result_type; @@ -175,4 +176,5 @@ inline std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >: }} // namespaces -#endif // BOOST_MATH_HANKEL_HPP
\ No newline at end of file +#endif // BOOST_MATH_HANKEL_HPP + |