gsl_sf_psi.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* specfunc/gsl_sf_psi.h
  2. *
  3. * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman
  4. *
  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.
  9. *
  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.
  14. *
  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.
  18. */
  19. /* Author: G. Jungman */
  20. #ifndef __GSL_SF_PSI_H__
  21. #define __GSL_SF_PSI_H__
  22. #include "gsl_sf_result.h"
  23. #undef __BEGIN_DECLS
  24. #undef __END_DECLS
  25. #ifdef __cplusplus
  26. # define __BEGIN_DECLS extern "C" {
  27. # define __END_DECLS }
  28. #else
  29. # define __BEGIN_DECLS /* empty */
  30. # define __END_DECLS /* empty */
  31. #endif
  32. __BEGIN_DECLS
  33. /* Poly-Gamma Functions
  34. *
  35. * psi(m,x) := (d/dx)^m psi(0,x) = (d/dx)^{m+1} log(gamma(x))
  36. */
  37. /* Di-Gamma Function psi(n) = psi(0,n)
  38. *
  39. * n > 0
  40. * exceptions: GSL_EDOM
  41. */
  42. int gsl_sf_psi_int_e(const int n, gsl_sf_result * result);
  43. double gsl_sf_psi_int(const int n);
  44. /* Di-Gamma Function psi(x) = psi(0, x)
  45. *
  46. * x != 0.0, -1.0, -2.0, ...
  47. * exceptions: GSL_EDOM, GSL_ELOSS
  48. */
  49. int gsl_sf_psi_e(const double x, gsl_sf_result * result);
  50. double gsl_sf_psi(const double x);
  51. /* Di-Gamma Function Re[psi(1 + I y)]
  52. *
  53. * exceptions: none
  54. */
  55. int gsl_sf_psi_1piy_e(const double y, gsl_sf_result * result);
  56. double gsl_sf_psi_1piy(const double y);
  57. /* Di-Gamma Function psi(z) for general complex argument z = x + iy
  58. *
  59. * exceptions: GSL_EDOM
  60. */
  61. int gsl_sf_complex_psi_e(
  62. const double x,
  63. const double y,
  64. gsl_sf_result * result_re,
  65. gsl_sf_result * result_im
  66. );
  67. /* Tri-Gamma Function psi^(1)(n)
  68. *
  69. * n > 0
  70. * exceptions: GSL_EDOM
  71. */
  72. int gsl_sf_psi_1_int_e(const int n, gsl_sf_result * result);
  73. double gsl_sf_psi_1_int(const int n);
  74. /* Tri-Gamma Function psi^(1)(x)
  75. *
  76. * x != 0.0, -1.0, -2.0, ...
  77. * exceptions: GSL_EDOM, GSL_ELOSS
  78. */
  79. int gsl_sf_psi_1_e(const double x, gsl_sf_result * result);
  80. double gsl_sf_psi_1(const double x);
  81. /* Poly-Gamma Function psi^(n)(x)
  82. *
  83. * n >= 0, x > 0.0
  84. * exceptions: GSL_EDOM
  85. */
  86. int gsl_sf_psi_n_e(const int n, const double x, gsl_sf_result * result);
  87. double gsl_sf_psi_n(const int n, const double x);
  88. __END_DECLS
  89. #endif /* __GSL_SF_PSI_H__ */