Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:03:53

0001 /* specfunc/gsl_sf_exp.h
0002  * 
0003  * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004 Gerard Jungman
0004  * 
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 3 of the License, or (at
0008  * your option) any later version.
0009  * 
0010  * This program is distributed in the hope that it will be useful, but
0011  * WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * General Public License for more details.
0014  * 
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program; if not, write to the Free Software
0017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0018  */
0019 
0020 /* Author:  G. Jungman */
0021 
0022 #ifndef __GSL_SF_EXP_H__
0023 #define __GSL_SF_EXP_H__
0024 
0025 #include <gsl/gsl_sf_result.h>
0026 #include <gsl/gsl_precision.h>
0027 
0028 #undef __BEGIN_DECLS
0029 #undef __END_DECLS
0030 #ifdef __cplusplus
0031 # define __BEGIN_DECLS extern "C" {
0032 # define __END_DECLS }
0033 #else
0034 # define __BEGIN_DECLS /* empty */
0035 # define __END_DECLS /* empty */
0036 #endif
0037 
0038 __BEGIN_DECLS
0039 
0040 /* Provide an exp() function with GSL semantics,
0041  * i.e. with proper error checking, etc.
0042  *
0043  * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
0044  */
0045 int gsl_sf_exp_e(const double x, gsl_sf_result * result);
0046 double gsl_sf_exp(const double x);
0047 
0048 
0049 /* Exp(x)
0050  *
0051  * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
0052  */
0053 int gsl_sf_exp_e10_e(const double x, gsl_sf_result_e10 * result);
0054 
0055 
0056 /* Exponentiate and multiply by a given factor:  y * Exp(x)
0057  *
0058  * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
0059  */
0060 int gsl_sf_exp_mult_e(const double x, const double y, gsl_sf_result * result);
0061 double gsl_sf_exp_mult(const double x, const double y);
0062 
0063 
0064 /* Exponentiate and multiply by a given factor:  y * Exp(x)
0065  *
0066  * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
0067  */
0068 int gsl_sf_exp_mult_e10_e(const double x, const double y, gsl_sf_result_e10 * result);
0069 
0070 
0071 /* exp(x)-1
0072  *
0073  * exceptions: GSL_EOVRFLW
0074  */
0075 int gsl_sf_expm1_e(const double x, gsl_sf_result * result);
0076 double gsl_sf_expm1(const double x);
0077 
0078 
0079 /* (exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) + ...
0080  *
0081  * exceptions: GSL_EOVRFLW
0082  */
0083 int gsl_sf_exprel_e(const double x, gsl_sf_result * result);
0084 double gsl_sf_exprel(const double x);
0085 
0086 
0087 /* 2(exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + ...
0088  *
0089  * exceptions: GSL_EOVRFLW
0090  */
0091 int gsl_sf_exprel_2_e(double x, gsl_sf_result * result);
0092 double gsl_sf_exprel_2(const double x);
0093 
0094 
0095 /* Similarly for the N-th generalization of
0096  * the above. The so-called N-relative exponential
0097  *
0098  * exprel_N(x) = N!/x^N (exp(x) - Sum[x^k/k!, {k,0,N-1}])
0099  *             = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ...
0100  *             = 1F1(1,1+N,x)
0101  */
0102 int gsl_sf_exprel_n_e(const int n, const double x, gsl_sf_result * result);
0103 double gsl_sf_exprel_n(const int n, const double x);
0104 
0105 int gsl_sf_exprel_n_CF_e(const double n, const double x, gsl_sf_result * result);
0106 
0107 
0108 /* Exponentiate a quantity with an associated error.
0109  */
0110 int gsl_sf_exp_err_e(const double x, const double dx, gsl_sf_result * result);
0111 
0112 /* Exponentiate a quantity with an associated error.
0113  */
0114 int gsl_sf_exp_err_e10_e(const double x, const double dx, gsl_sf_result_e10 * result);
0115 
0116 
0117 /* Exponentiate and multiply by a given factor:  y * Exp(x),
0118  * for quantities with associated errors.
0119  *
0120  * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
0121  */
0122 int gsl_sf_exp_mult_err_e(const double x, const double dx, const double y, const double dy, gsl_sf_result * result);
0123 
0124 
0125 /* Exponentiate and multiply by a given factor:  y * Exp(x),
0126  * for quantities with associated errors.
0127  *
0128  * exceptions: GSL_EOVRFLW, GSL_EUNDRFLW
0129  */
0130 int gsl_sf_exp_mult_err_e10_e(const double x, const double dx, const double y, const double dy, gsl_sf_result_e10 * result);
0131 
0132 __END_DECLS
0133 
0134 #endif /* __GSL_SF_EXP_H__ */