| 1 | /* specfunc/gsl_sf_exp.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 | |
| 20 | /* Author: G. Jungman */ |
| 21 | |
| 22 | #ifndef __GSL_SF_EXP_H__ |
| 23 | #define __GSL_SF_EXP_H__cxx . . $ `external/gsl/gsl_sf_exp.h:23:9`! |
| 24 | |
| 25 | #include "gsl_sf_result.h"cxx . . $ `<file>/external/gsl/gsl_sf_result.h`/ |
| 26 | #include "gsl_precision.h"cxx . . $ `<file>/external/gsl/gsl_precision.h`/ |
| 27 | |
| 28 | #undef __BEGIN_DECLScxx . . $ `external/gsl/gsl_sf_result.h:31:10`! |
| 29 | #undef __END_DECLScxx . . $ `external/gsl/gsl_sf_result.h:32:10`! |
| 30 | #ifdef __cplusplus |
| 31 | # define __BEGIN_DECLS extern "C" { |
| 32 | # define __END_DECLS } |
| 33 | #else |
| 34 | # define __BEGIN_DECLScxx . . $ `external/gsl/gsl_sf_exp.h:34:10`! /* empty */ |
| 35 | # define __END_DECLScxx . . $ `external/gsl/gsl_sf_exp.h:35:10`! /* empty */ |
| 36 | #endif |
| 37 | |
| 38 | __BEGIN_DECLScxx . . $ `external/gsl/gsl_sf_exp.h:34:10`! |
| 39 | |
| 40 | /* Provide an exp() function with GSL semantics, |
| 41 | * i.e. with proper error checking, etc. |
| 42 | * |
| 43 | * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW |
| 44 | */ |
| 45 | int gsl_sf_exp_ecxx . . $ gsl_sf_exp_e(feafd9287608bc44).(const double x, gsl_sf_resultcxx . . $ gsl_sf_result# * result); |
| 46 | double gsl_sf_expcxx . . $ gsl_sf_exp(447c67c6676f75c3).(const double x); |
| 47 | |
| 48 | |
| 49 | /* Exp(x) |
| 50 | * |
| 51 | * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW |
| 52 | */ |
| 53 | int gsl_sf_exp_e10_ecxx . . $ gsl_sf_exp_e10_e(7ed97400efb45244).(const double x, gsl_sf_result_e10cxx . . $ gsl_sf_result_e10# * result); |
| 54 | |
| 55 | |
| 56 | /* Exponentiate and multiply by a given factor: y * Exp(x) |
| 57 | * |
| 58 | * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW |
| 59 | */ |
| 60 | int gsl_sf_exp_mult_ecxx . . $ gsl_sf_exp_mult_e(38fedf92a6b14b51).(const double x, const double y, gsl_sf_resultcxx . . $ gsl_sf_result# * result); |
| 61 | double gsl_sf_exp_multcxx . . $ gsl_sf_exp_mult(d8e7e0733fa41c87).(const double x, const double y); |
| 62 | |
| 63 | |
| 64 | /* Exponentiate and multiply by a given factor: y * Exp(x) |
| 65 | * |
| 66 | * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW |
| 67 | */ |
| 68 | int gsl_sf_exp_mult_e10_ecxx . . $ gsl_sf_exp_mult_e10_e(c5d4db08b8345028).(const double x, const double y, gsl_sf_result_e10cxx . . $ gsl_sf_result_e10# * result); |
| 69 | |
| 70 | |
| 71 | /* exp(x)-1 |
| 72 | * |
| 73 | * exceptions: GSL_EOVRFLW |
| 74 | */ |
| 75 | int gsl_sf_expm1_ecxx . . $ gsl_sf_expm1_e(feafd9287608bc44).(const double x, gsl_sf_resultcxx . . $ gsl_sf_result# * result); |
| 76 | double gsl_sf_expm1cxx . . $ gsl_sf_expm1(447c67c6676f75c3).(const double x); |
| 77 | |
| 78 | |
| 79 | /* (exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) + ... |
| 80 | * |
| 81 | * exceptions: GSL_EOVRFLW |
| 82 | */ |
| 83 | int gsl_sf_exprel_ecxx . . $ gsl_sf_exprel_e(feafd9287608bc44).(const double x, gsl_sf_resultcxx . . $ gsl_sf_result# * result); |
| 84 | double gsl_sf_exprelcxx . . $ gsl_sf_exprel(447c67c6676f75c3).(const double x); |
| 85 | |
| 86 | |
| 87 | /* 2(exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + ... |
| 88 | * |
| 89 | * exceptions: GSL_EOVRFLW |
| 90 | */ |
| 91 | int gsl_sf_exprel_2_ecxx . . $ gsl_sf_exprel_2_e(feafd9287608bc44).(double x, gsl_sf_resultcxx . . $ gsl_sf_result# * result); |
| 92 | double gsl_sf_exprel_2cxx . . $ gsl_sf_exprel_2(447c67c6676f75c3).(const double x); |
| 93 | |
| 94 | |
| 95 | /* Similarly for the N-th generalization of |
| 96 | * the above. The so-called N-relative exponential |
| 97 | * |
| 98 | * exprel_N(x) = N!/x^N (exp(x) - Sum[x^k/k!, {k,0,N-1}]) |
| 99 | * = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ... |
| 100 | * = 1F1(1,1+N,x) |
| 101 | */ |
| 102 | int gsl_sf_exprel_n_ecxx . . $ gsl_sf_exprel_n_e(6e0db8bf56396db2).(const int n, const double x, gsl_sf_resultcxx . . $ gsl_sf_result# * result); |
| 103 | double gsl_sf_exprel_ncxx . . $ gsl_sf_exprel_n(538a8530131fd110).(const int n, const double x); |
| 104 | |
| 105 | |
| 106 | /* Exponentiate a quantity with an associated error. |
| 107 | */ |
| 108 | int gsl_sf_exp_err_ecxx . . $ gsl_sf_exp_err_e(38fedf92a6b14b51).(const double x, const double dx, gsl_sf_resultcxx . . $ gsl_sf_result# * result); |
| 109 | |
| 110 | /* Exponentiate a quantity with an associated error. |
| 111 | */ |
| 112 | int gsl_sf_exp_err_e10_ecxx . . $ gsl_sf_exp_err_e10_e(c5d4db08b8345028).(const double x, const double dx, gsl_sf_result_e10cxx . . $ gsl_sf_result_e10# * result); |
| 113 | |
| 114 | |
| 115 | /* Exponentiate and multiply by a given factor: y * Exp(x), |
| 116 | * for quantities with associated errors. |
| 117 | * |
| 118 | * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW |
| 119 | */ |
| 120 | int gsl_sf_exp_mult_err_ecxx . . $ gsl_sf_exp_mult_err_e(30e1ceaed94c3433).(const double x, const double dx, const double y, const double dy, gsl_sf_resultcxx . . $ gsl_sf_result# * result); |
| 121 | |
| 122 | |
| 123 | /* Exponentiate and multiply by a given factor: y * Exp(x), |
| 124 | * for quantities with associated errors. |
| 125 | * |
| 126 | * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW |
| 127 | */ |
| 128 | int gsl_sf_exp_mult_err_e10_ecxx . . $ gsl_sf_exp_mult_err_e10_e(3f524488ccf7fc55).(const double x, const double dx, const double y, const double dy, gsl_sf_result_e10cxx . . $ gsl_sf_result_e10# * result); |
| 129 | |
| 130 | __END_DECLScxx . . $ `external/gsl/gsl_sf_exp.h:35:10`! |
| 131 | |
| 132 | #endif /* __GSL_SF_EXP_H__ */ |