]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/math/test/test_erf_hooks.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / math / test / test_erf_hooks.hpp
CommitLineData
7c673cae
FG
1// (C) Copyright John Maddock 2006.
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_NATIVE
10namespace other{
11inline float erf(float a)
12{
13 return ::erff(a);
14}
15inline float erfc(float a)
16{
17 return ::erfcf(a);
18}
19inline double erf(double a)
20{
21 return ::erf(a);
22}
23inline double erfc(double a)
24{
25 return ::erfc(a);
26}
27inline long double erf(long double a)
28{
29 return ::erfl(a);
30}
31inline long double erfc(long double a)
32{
33 return ::erfcl(a);
34}
35}
36#define TEST_OTHER
37#endif
38
39#ifdef TEST_CEPHES
40namespace other{
41extern "C" {
42 double erf(double);
43 float erff(float);
44 long double erfl(long double);
45}
46inline float erf(float a)
47{ return erff(a); }
48inline long double erf(long double a)
49{
1e59de90 50#ifdef _MSC_VER
7c673cae
FG
51 return erf((double)a);
52#else
53 return erfl(a);
54#endif
55}
56extern "C" {
57 double erfc(double);
58 float erfcf(float);
59 long double erfcl(long double);
60}
61inline float erfc(float a)
62{ return erfcf(a); }
63inline long double erfc(long double a)
64{
1e59de90 65#ifdef _MSC_VER
7c673cae
FG
66 return erfc((double)a);
67#else
68 return erfcl(a);
69#endif
70}
71}
72#define TEST_OTHER
73#endif
74
75#ifdef TEST_GSL
76#include <gsl/gsl_sf_erf.h>
77
78namespace other{
79inline float erf(float a)
80{ return (float)gsl_sf_erf(a); }
81inline double erf(double a)
82{ return gsl_sf_erf(a); }
83inline long double erf(long double a)
84{ return gsl_sf_erf(a); }
85inline float erfc(float a)
86{ return (float)gsl_sf_erfc(a); }
87inline double erfc(double a)
88{ return gsl_sf_erfc(a); }
89inline long double erfc(long double a)
90{ return gsl_sf_erfc(a); }
91}
92#define TEST_OTHER
93#endif
94
95#ifdef TEST_OTHER
96namespace other{
97 boost::math::concepts::real_concept erf(boost::math::concepts::real_concept){ return 0; }
98 boost::math::concepts::real_concept erfc(boost::math::concepts::real_concept){ return 0; }
99}
100#endif
101
102
103#endif
104
105