1 /* specfunc/gsl_sf_psi.h
3 * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or (at
8 * your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 /* Author: G. Jungman */
22 #ifndef __GSL_SF_PSI_H__
23 #define __GSL_SF_PSI_H__
25 #include <gsl/gsl_sf_result.h>
30 # define __BEGIN_DECLS extern "C" {
31 # define __END_DECLS }
33 # define __BEGIN_DECLS /* empty */
34 # define __END_DECLS /* empty */
40 /* Poly-Gamma Functions
42 * psi(m,x) := (d/dx)^m psi(0,x) = (d/dx)^{m+1} log(gamma(x))
46 /* Di-Gamma Function psi(n) = psi(0,n)
49 * exceptions: GSL_EDOM
51 int gsl_sf_psi_int_e(const int n, gsl_sf_result * result);
52 double gsl_sf_psi_int(const int n);
55 /* Di-Gamma Function psi(x) = psi(0, x)
57 * x != 0.0, -1.0, -2.0, ...
58 * exceptions: GSL_EDOM, GSL_ELOSS
60 int gsl_sf_psi_e(const double x, gsl_sf_result * result);
61 double gsl_sf_psi(const double x);
64 /* Di-Gamma Function Re[psi(1 + I y)]
68 int gsl_sf_psi_1piy_e(const double y, gsl_sf_result * result);
69 double gsl_sf_psi_1piy(const double y);
72 /* Di-Gamma Function psi(z) for general complex argument z = x + iy
74 * exceptions: GSL_EDOM
76 int gsl_sf_complex_psi_e(
79 gsl_sf_result * result_re,
80 gsl_sf_result * result_im
84 /* Tri-Gamma Function psi^(1)(n)
87 * exceptions: GSL_EDOM
89 int gsl_sf_psi_1_int_e(const int n, gsl_sf_result * result);
90 double gsl_sf_psi_1_int(const int n);
93 /* Tri-Gamma Function psi^(1)(x)
95 * x != 0.0, -1.0, -2.0, ...
96 * exceptions: GSL_EDOM, GSL_ELOSS
98 int gsl_sf_psi_1_e(const double x, gsl_sf_result * result);
99 double gsl_sf_psi_1(const double x);
102 /* Poly-Gamma Function psi^(n)(x)
105 * exceptions: GSL_EDOM
107 int gsl_sf_psi_n_e(const int n, const double x, gsl_sf_result * result);
108 double gsl_sf_psi_n(const int n, const double x);
113 #endif /* __GSL_SF_PSI_H__ */