summaryrefslogtreecommitdiffstats
path: root/src/boost/libs/math/test/test_bessel_hooks.hpp
blob: c089e4acf5f1d621e2fd8126f1432d73d5dbbdd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//  (C) Copyright John Maddock 2007.
//  Use, modification and distribution are subject to the
//  Boost Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_MATH_TEST_ERF_OTHER_HOOKS_HPP
#define BOOST_MATH_TEST_ERF_OTHER_HOOKS_HPP

#ifdef TEST_CEPHES
namespace other{
extern "C" {
   double jv(double, double);
   float jvf(float, float);
   long double jvl(long double, long double);
   double yv(double, double);
   float yvf(float, float);
   long double yvl(long double, long double);
}
inline float cyl_bessel_j(float a, float x)
{ return jvf(a, x); }
inline double cyl_bessel_j(double a, double x)
{ return jv(a, x); }
inline long double cyl_bessel_j(long double a, long double x)
{
#ifdef BOOST_MSVC
   return jv((double)a, x); 
#else
   return jvl(a, x); 
#endif
}
inline float cyl_neumann(float a, float x)
{ return yvf(a, x); }
inline double cyl_neumann(double a, double x)
{ return yv(a, x); }
inline long double cyl_neumann(long double a, long double x)
{
#ifdef BOOST_MSVC
   return yv((double)a, x); 
#else
   return yvl(a, x); 
#endif
}
}
#define TEST_OTHER
#endif

#ifdef TEST_GSL
#include <gsl/gsl_sf_bessel.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_message.h>

namespace other{
inline float cyl_bessel_j(float a, float x)
{ return (float)gsl_sf_bessel_Jnu(a, x); }
inline double cyl_bessel_j(double a, double x)
{ return gsl_sf_bessel_Jnu(a, x); }
inline long double cyl_bessel_j(long double a, long double x)
{ return gsl_sf_bessel_Jnu(a, x); }

inline float cyl_bessel_i(float a, float x)
{ return (float)gsl_sf_bessel_Inu(a, x); }
inline double cyl_bessel_i(double a, double x)
{ return gsl_sf_bessel_Inu(a, x); }
inline long double cyl_bessel_i(long double a, long double x)
{ return gsl_sf_bessel_Inu(a, x); }

inline float cyl_bessel_k(float a, float x)
{ return (float)gsl_sf_bessel_Knu(a, x); }
inline double cyl_bessel_k(double a, double x)
{ return gsl_sf_bessel_Knu(a, x); }
inline long double cyl_bessel_k(long double a, long double x)
{ return gsl_sf_bessel_Knu(a, x); }

inline float cyl_neumann(float a, float x)
{ return (float)gsl_sf_bessel_Ynu(a, x); }
inline double cyl_neumann(double a, double x)
{ return gsl_sf_bessel_Ynu(a, x); }
inline long double cyl_neumann(long double a, long double x)
{ return gsl_sf_bessel_Ynu(a, x); }
}
#define TEST_OTHER
#endif

#ifdef TEST_OTHER
namespace other{
   boost::math::concepts::real_concept cyl_bessel_j(boost::math::concepts::real_concept, boost::math::concepts::real_concept){ return 0; }
   boost::math::concepts::real_concept cyl_bessel_i(boost::math::concepts::real_concept, boost::math::concepts::real_concept){ return 0; }
   boost::math::concepts::real_concept cyl_bessel_k(boost::math::concepts::real_concept, boost::math::concepts::real_concept){ return 0; }
   boost::math::concepts::real_concept cyl_neumann(boost::math::concepts::real_concept, boost::math::concepts::real_concept){ return 0; }
}
#endif


#endif