GremlinEq
specialfuncs.h
1 //---------------------------------------------------------------------------
2 //
3 // $Id: specialfuncs.h,v 1.1 2013/05/17 15:30:12 sahughes Exp $
4 //
5 //---------------------------------------------------------------------------
6 
7 /* funcs.h
8  * headers for the special functions routines
9  */
10 
11 #ifndef FUNCS_H_SEEN
12 #define FUNCS_H_SEEN
13 
14 #include <complex>
15 
16 /* These functions have been declared using the built in types because some
17  * of them (mainly gammln) will not give enough precision for a long double */
18 
19 /* logarithm of the gamma function */
20 std::complex<double> gammln(const std::complex<double> x);
21 
22 /* logarithm of the sine function */
23 std::complex<double> sinln(const std::complex<double> x);
24 
25 /* hypergeometric function 2F1(n1,n2;d1;x)
26  * only works for abs(x) < 1
27  * it has some issues for large magnitude n1,n2,d1, particularly near x = -1
28  */
29 std::complex<double>
30 hypergeom2F1(std::complex<double> n1, std::complex<double> n2,
31  std::complex<double> d1, std::complex<double> x);
32 
33 /* confluent hypergeometric function 1F1(n1;d1;x) */
34 std::complex<double>
35 hypergeom1F1(std::complex<double> n1, std::complex<double> d1,
36  std::complex<double> x);
37 
38 /* irregular Tricomi hypergeometric function U(a;b;x) */
39 std::complex<double>
40 hypergeomU(std::complex<double> a, std::complex<double> b,
41  std::complex<double> x);
42 
43 /* irregular Tricomi hypergeometric function U(a;b;x)*Gamma(a-b+1)/Gamma(1-b)
44  */
45 std::complex<double>
46 hypergeomU_reduced(std::complex<double> a, std::complex<double> b,
47  std::complex<double> x);
48 
49 #endif /* !FUNCS_H_SEEN */