]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/test/test_bessel_hooks.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / math / test / test_bessel_hooks.hpp
1 // (C) Copyright John Maddock 2007.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6 #ifndef BOOST_MATH_TEST_ERF_OTHER_HOOKS_HPP
7 #define BOOST_MATH_TEST_ERF_OTHER_HOOKS_HPP
8
9 #ifdef TEST_CEPHES
10 namespace other{
11 extern "C" {
12 double jv(double, double);
13 float jvf(float, float);
14 long double jvl(long double, long double);
15 double yv(double, double);
16 float yvf(float, float);
17 long double yvl(long double, long double);
18 }
19 inline float cyl_bessel_j(float a, float x)
20 { return jvf(a, x); }
21 inline double cyl_bessel_j(double a, double x)
22 { return jv(a, x); }
23 inline long double cyl_bessel_j(long double a, long double x)
24 {
25 #ifdef BOOST_MSVC
26 return jv((double)a, x);
27 #else
28 return jvl(a, x);
29 #endif
30 }
31 inline float cyl_neumann(float a, float x)
32 { return yvf(a, x); }
33 inline double cyl_neumann(double a, double x)
34 { return yv(a, x); }
35 inline long double cyl_neumann(long double a, long double x)
36 {
37 #ifdef BOOST_MSVC
38 return yv((double)a, x);
39 #else
40 return yvl(a, x);
41 #endif
42 }
43 }
44 #define TEST_OTHER
45 #endif
46
47 #ifdef TEST_GSL
48 #include <gsl/gsl_sf_bessel.h>
49 #include <gsl/gsl_errno.h>
50 #include <gsl/gsl_message.h>
51
52 namespace other{
53 inline float cyl_bessel_j(float a, float x)
54 { return (float)gsl_sf_bessel_Jnu(a, x); }
55 inline double cyl_bessel_j(double a, double x)
56 { return gsl_sf_bessel_Jnu(a, x); }
57 inline long double cyl_bessel_j(long double a, long double x)
58 { return gsl_sf_bessel_Jnu(a, x); }
59
60 inline float cyl_bessel_i(float a, float x)
61 { return (float)gsl_sf_bessel_Inu(a, x); }
62 inline double cyl_bessel_i(double a, double x)
63 { return gsl_sf_bessel_Inu(a, x); }
64 inline long double cyl_bessel_i(long double a, long double x)
65 { return gsl_sf_bessel_Inu(a, x); }
66
67 inline float cyl_bessel_k(float a, float x)
68 { return (float)gsl_sf_bessel_Knu(a, x); }
69 inline double cyl_bessel_k(double a, double x)
70 { return gsl_sf_bessel_Knu(a, x); }
71 inline long double cyl_bessel_k(long double a, long double x)
72 { return gsl_sf_bessel_Knu(a, x); }
73
74 inline float cyl_neumann(float a, float x)
75 { return (float)gsl_sf_bessel_Ynu(a, x); }
76 inline double cyl_neumann(double a, double x)
77 { return gsl_sf_bessel_Ynu(a, x); }
78 inline long double cyl_neumann(long double a, long double x)
79 { return gsl_sf_bessel_Ynu(a, x); }
80 }
81 #define TEST_OTHER
82 #endif
83
84 #ifdef TEST_OTHER
85 namespace other{
86 boost::math::concepts::real_concept cyl_bessel_j(boost::math::concepts::real_concept, boost::math::concepts::real_concept){ return 0; }
87 boost::math::concepts::real_concept cyl_bessel_i(boost::math::concepts::real_concept, boost::math::concepts::real_concept){ return 0; }
88 boost::math::concepts::real_concept cyl_bessel_k(boost::math::concepts::real_concept, boost::math::concepts::real_concept){ return 0; }
89 boost::math::concepts::real_concept cyl_neumann(boost::math::concepts::real_concept, boost::math::concepts::real_concept){ return 0; }
90 }
91 #endif
92
93
94 #endif
95
96
97