gsl_sf_expint.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /* specfunc/gsl_sf_expint.h
  2. *
  3. * Copyright (C) 2007 Brian Gough
  4. * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 Gerard Jungman
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. /* Author: G. Jungman */
  21. #ifndef __GSL_SF_EXPINT_H__
  22. #define __GSL_SF_EXPINT_H__
  23. #include "gsl_sf_result.h"
  24. #undef __BEGIN_DECLS
  25. #undef __END_DECLS
  26. #ifdef __cplusplus
  27. # define __BEGIN_DECLS extern "C" {
  28. # define __END_DECLS }
  29. #else
  30. # define __BEGIN_DECLS /* empty */
  31. # define __END_DECLS /* empty */
  32. #endif
  33. __BEGIN_DECLS
  34. /* E_1(x) := Re[ Integrate[ Exp[-xt]/t, {t,1,Infinity}] ]
  35. *
  36. * x != 0.0
  37. * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW
  38. */
  39. int gsl_sf_expint_E1_e(const double x, gsl_sf_result * result);
  40. double gsl_sf_expint_E1(const double x);
  41. /* E_2(x) := Re[ Integrate[ Exp[-xt]/t^2, {t,1,Infinity}] ]
  42. *
  43. * x != 0.0
  44. * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW
  45. */
  46. int gsl_sf_expint_E2_e(const double x, gsl_sf_result * result);
  47. double gsl_sf_expint_E2(const double x);
  48. /* E_n(x) := Re[ Integrate[ Exp[-xt]/t^n, {t,1,Infinity}] ]
  49. *
  50. * x != 0.0
  51. * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW
  52. */
  53. int gsl_sf_expint_En_e(const int n, const double x, gsl_sf_result * result);
  54. double gsl_sf_expint_En(const int n, const double x);
  55. /* E_1_scaled(x) := exp(x) E_1(x)
  56. *
  57. * x != 0.0
  58. * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW
  59. */
  60. int gsl_sf_expint_E1_scaled_e(const double x, gsl_sf_result * result);
  61. double gsl_sf_expint_E1_scaled(const double x);
  62. /* E_2_scaled(x) := exp(x) E_2(x)
  63. *
  64. * x != 0.0
  65. * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW
  66. */
  67. int gsl_sf_expint_E2_scaled_e(const double x, gsl_sf_result * result);
  68. double gsl_sf_expint_E2_scaled(const double x);
  69. /* E_n_scaled(x) := exp(x) E_n(x)
  70. *
  71. * x != 0.0
  72. * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW
  73. */
  74. int gsl_sf_expint_En_scaled_e(const int n, const double x, gsl_sf_result * result);
  75. double gsl_sf_expint_En_scaled(const int n, const double x);
  76. /* Ei(x) := - PV Integrate[ Exp[-t]/t, {t,-x,Infinity}]
  77. * := PV Integrate[ Exp[t]/t, {t,-Infinity,x}]
  78. *
  79. * x != 0.0
  80. * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW
  81. */
  82. int gsl_sf_expint_Ei_e(const double x, gsl_sf_result * result);
  83. double gsl_sf_expint_Ei(const double x);
  84. /* Ei_scaled(x) := exp(-x) Ei(x)
  85. *
  86. * x != 0.0
  87. * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW
  88. */
  89. int gsl_sf_expint_Ei_scaled_e(const double x, gsl_sf_result * result);
  90. double gsl_sf_expint_Ei_scaled(const double x);
  91. /* Shi(x) := Integrate[ Sinh[t]/t, {t,0,x}]
  92. *
  93. * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
  94. */
  95. int gsl_sf_Shi_e(const double x, gsl_sf_result * result);
  96. double gsl_sf_Shi(const double x);
  97. /* Chi(x) := Re[ M_EULER + log(x) + Integrate[(Cosh[t]-1)/t, {t,0,x}] ]
  98. *
  99. * x != 0.0
  100. * exceptions: GSL_EDOM, GSL_EOVRFLW, GSL_EUNDRFLW
  101. */
  102. int gsl_sf_Chi_e(const double x, gsl_sf_result * result);
  103. double gsl_sf_Chi(const double x);
  104. /* Ei_3(x) := Integral[ Exp[-t^3], {t,0,x}]
  105. *
  106. * x >= 0.0
  107. * exceptions: GSL_EDOM
  108. */
  109. int gsl_sf_expint_3_e(const double x, gsl_sf_result * result);
  110. double gsl_sf_expint_3(double x);
  111. /* Si(x) := Integrate[ Sin[t]/t, {t,0,x}]
  112. *
  113. * exceptions: none
  114. */
  115. int gsl_sf_Si_e(const double x, gsl_sf_result * result);
  116. double gsl_sf_Si(const double x);
  117. /* Ci(x) := -Integrate[ Cos[t]/t, {t,x,Infinity}]
  118. *
  119. * x > 0.0
  120. * exceptions: GSL_EDOM
  121. */
  122. int gsl_sf_Ci_e(const double x, gsl_sf_result * result);
  123. double gsl_sf_Ci(const double x);
  124. /* AtanInt(x) := Integral[ Arctan[t]/t, {t,0,x}]
  125. *
  126. *
  127. * exceptions:
  128. */
  129. int gsl_sf_atanint_e(const double x, gsl_sf_result * result);
  130. double gsl_sf_atanint(const double x);
  131. __END_DECLS
  132. #endif /* __GSL_SF_EXPINT_H__ */