gsl_sf_zeta.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* specfunc/gsl_sf_zeta.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_ZETA_H__
  21. #define __GSL_SF_ZETA_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. /* Riemann Zeta Function
  34. * zeta(n) = Sum[ k^(-n), {k,1,Infinity} ]
  35. *
  36. * n=integer, n != 1
  37. * exceptions: GSL_EDOM, GSL_EOVRFLW
  38. */
  39. int gsl_sf_zeta_int_e(const int n, gsl_sf_result * result);
  40. double gsl_sf_zeta_int(const int n);
  41. /* Riemann Zeta Function
  42. * zeta(x) = Sum[ k^(-s), {k,1,Infinity} ], s != 1.0
  43. *
  44. * s != 1.0
  45. * exceptions: GSL_EDOM, GSL_EOVRFLW
  46. */
  47. int gsl_sf_zeta_e(const double s, gsl_sf_result * result);
  48. double gsl_sf_zeta(const double s);
  49. /* Riemann Zeta Function minus 1
  50. * useful for evaluating the fractional part
  51. * of Riemann zeta for large argument
  52. *
  53. * s != 1.0
  54. * exceptions: GSL_EDOM, GSL_EOVRFLW
  55. */
  56. int gsl_sf_zetam1_e(const double s, gsl_sf_result * result);
  57. double gsl_sf_zetam1(const double s);
  58. /* Riemann Zeta Function minus 1 for integer arg
  59. * useful for evaluating the fractional part
  60. * of Riemann zeta for large argument
  61. *
  62. * s != 1.0
  63. * exceptions: GSL_EDOM, GSL_EOVRFLW
  64. */
  65. int gsl_sf_zetam1_int_e(const int s, gsl_sf_result * result);
  66. double gsl_sf_zetam1_int(const int s);
  67. /* Hurwitz Zeta Function
  68. * zeta(s,q) = Sum[ (k+q)^(-s), {k,0,Infinity} ]
  69. *
  70. * s > 1.0, q > 0.0
  71. * exceptions: GSL_EDOM, GSL_EUNDRFLW, GSL_EOVRFLW
  72. */
  73. int gsl_sf_hzeta_e(const double s, const double q, gsl_sf_result * result);
  74. double gsl_sf_hzeta(const double s, const double q);
  75. /* Eta Function
  76. * eta(n) = (1-2^(1-n)) zeta(n)
  77. *
  78. * exceptions: GSL_EUNDRFLW, GSL_EOVRFLW
  79. */
  80. int gsl_sf_eta_int_e(int n, gsl_sf_result * result);
  81. double gsl_sf_eta_int(const int n);
  82. /* Eta Function
  83. * eta(s) = (1-2^(1-s)) zeta(s)
  84. *
  85. * exceptions: GSL_EUNDRFLW, GSL_EOVRFLW
  86. */
  87. int gsl_sf_eta_e(const double s, gsl_sf_result * result);
  88. double gsl_sf_eta(const double s);
  89. __END_DECLS
  90. #endif /* __GSL_SF_ZETA_H__ */