gsl_sf_erf.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /* specfunc/gsl_sf_erf.h
  2. *
  3. * Copyright (C) 1996, 1997, 1998, 1999, 2000 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_ERF_H__
  21. #define __GSL_SF_ERF_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. /* Complementary Error Function
  34. * erfc(x) := 2/Sqrt[Pi] Integrate[Exp[-t^2], {t,x,Infinity}]
  35. *
  36. * exceptions: none
  37. */
  38. int gsl_sf_erfc_e(double x, gsl_sf_result * result);
  39. double gsl_sf_erfc(double x);
  40. /* Log Complementary Error Function
  41. *
  42. * exceptions: none
  43. */
  44. int gsl_sf_log_erfc_e(double x, gsl_sf_result * result);
  45. double gsl_sf_log_erfc(double x);
  46. /* Error Function
  47. * erf(x) := 2/Sqrt[Pi] Integrate[Exp[-t^2], {t,0,x}]
  48. *
  49. * exceptions: none
  50. */
  51. int gsl_sf_erf_e(double x, gsl_sf_result * result);
  52. double gsl_sf_erf(double x);
  53. /* Probability functions:
  54. * Z(x) : Abramowitz+Stegun 26.2.1
  55. * Q(x) : Abramowitz+Stegun 26.2.3
  56. *
  57. * exceptions: none
  58. */
  59. int gsl_sf_erf_Z_e(double x, gsl_sf_result * result);
  60. int gsl_sf_erf_Q_e(double x, gsl_sf_result * result);
  61. double gsl_sf_erf_Z(double x);
  62. double gsl_sf_erf_Q(double x);
  63. /* Hazard function, also known as the inverse Mill's ratio.
  64. *
  65. * H(x) := Z(x)/Q(x)
  66. * = Sqrt[2/Pi] Exp[-x^2 / 2] / Erfc[x/Sqrt[2]]
  67. *
  68. * exceptions: GSL_EUNDRFLW
  69. */
  70. int gsl_sf_hazard_e(double x, gsl_sf_result * result);
  71. double gsl_sf_hazard(double x);
  72. __END_DECLS
  73. #endif /* __GSL_SF_ERF_H__ */