1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
@cindex exponential function
@cindex exp
The functions described in this section are declared in the header file
@file{gsl_sf_exp.h}.
@menu
* Exponential Function::
* Relative Exponential Functions::
* Exponentiation With Error Estimate::
@end menu
@node Exponential Function
@subsection Exponential Function
@deftypefun double gsl_sf_exp (double @var{x})
@deftypefunx int gsl_sf_exp_e (double @var{x}, gsl_sf_result * @var{result})
These routines provide an exponential function @math{\exp(x)} using GSL
semantics and error checking.
@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW
@end deftypefun
@deftypefun int gsl_sf_exp_e10_e (double @var{x}, gsl_sf_result_e10 * @var{result})
This function computes the exponential @math{\exp(x)} using the
@code{gsl_sf_result_e10} type to return a result with extended range.
This function may be useful if the value of @math{\exp(x)} would
overflow the numeric range of @code{double}.
@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW
@end deftypefun
@deftypefun double gsl_sf_exp_mult (double @var{x}, double @var{y})
@deftypefunx int gsl_sf_exp_mult_e (double @var{x}, double @var{y}, gsl_sf_result * @var{result})
These routines exponentiate @var{x} and multiply by the factor @var{y}
to return the product @math{y \exp(x)}.
@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW
@end deftypefun
@deftypefun int gsl_sf_exp_mult_e10_e (const double @var{x}, const double @var{y}, gsl_sf_result_e10 * @var{result})
This function computes the product @math{y \exp(x)} using the
@code{gsl_sf_result_e10} type to return a result with extended numeric
range.
@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW
@end deftypefun
@node Relative Exponential Functions
@subsection Relative Exponential Functions
@deftypefun double gsl_sf_expm1 (double @var{x})
@deftypefunx int gsl_sf_expm1_e (double @var{x}, gsl_sf_result * @var{result})
These routines compute the quantity @math{\exp(x)-1} using an algorithm
that is accurate for small @math{x}.
@comment Exceptional Return Values: GSL_EOVRFLW
@end deftypefun
@deftypefun double gsl_sf_exprel (double @var{x})
@deftypefunx int gsl_sf_exprel_e (double @var{x}, gsl_sf_result * @var{result})
These routines compute the quantity @math{(\exp(x)-1)/x} using an
algorithm that is accurate for small @math{x}. For small @math{x} the
algorithm is based on the expansion @math{(\exp(x)-1)/x = 1 + x/2 +
x^2/(2*3) + x^3/(2*3*4) + \dots}.
@comment Exceptional Return Values: GSL_EOVRFLW
@end deftypefun
@deftypefun double gsl_sf_exprel_2 (double @var{x})
@deftypefunx int gsl_sf_exprel_2_e (double @var{x}, gsl_sf_result * @var{result})
These routines compute the quantity @math{2(\exp(x)-1-x)/x^2} using an
algorithm that is accurate for small @math{x}. For small @math{x} the
algorithm is based on the expansion @math{2(\exp(x)-1-x)/x^2 =
1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + \dots}.
@comment Exceptional Return Values: GSL_EOVRFLW
@end deftypefun
@deftypefun double gsl_sf_exprel_n (int @var{n}, double @var{x})
@deftypefunx int gsl_sf_exprel_n_e (int @var{n}, double @var{x}, gsl_sf_result * @var{result})
These routines compute the @math{N}-relative exponential, which is the
@var{n}-th generalization of the functions @code{gsl_sf_exprel} and
@code{gsl_sf_exprel_2}. The @math{N}-relative exponential is given by,
@tex
\beforedisplay
$$
\eqalign{
\hbox{exprel}_N(x)
&= N!/x^N \left(\exp(x) - \sum_{k=0}^{N-1} x^k/k!\right)\cr
&= 1 + x/(N+1) + x^2/((N+1)(N+2)) + \dots\cr
&= {}_1F_1(1,1+N,x)\cr
}
$$
\afterdisplay
@end tex
@ifinfo
@example
exprel_N(x) = N!/x^N (\exp(x) - \sum_@{k=0@}^@{N-1@} x^k/k!)
= 1 + x/(N+1) + x^2/((N+1)(N+2)) + ...
= 1F1 (1,1+N,x)
@end example
@end ifinfo
@comment Exceptional Return Values:
@end deftypefun
@node Exponentiation With Error Estimate
@subsection Exponentiation With Error Estimate
@deftypefun int gsl_sf_exp_err_e (double @var{x}, double @var{dx}, gsl_sf_result * @var{result})
This function exponentiates @var{x} with an associated absolute error
@var{dx}.
@comment Exceptional Return Values:
@end deftypefun
@deftypefun int gsl_sf_exp_err_e10_e (double @var{x}, double @var{dx}, gsl_sf_result_e10 * @var{result})
This function exponentiates a quantity @var{x} with an associated absolute
error @var{dx} using the @code{gsl_sf_result_e10} type to return a result with
extended range.
@comment Exceptional Return Values:
@end deftypefun
@deftypefun int gsl_sf_exp_mult_err_e (double @var{x}, double @var{dx}, double @var{y}, double @var{dy}, gsl_sf_result * @var{result})
This routine computes the product @math{y \exp(x)} for the quantities
@var{x}, @var{y} with associated absolute errors @var{dx}, @var{dy}.
@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW
@end deftypefun
@deftypefun int gsl_sf_exp_mult_err_e10_e (double @var{x}, double @var{dx}, double @var{y}, double @var{dy}, gsl_sf_result_e10 * @var{result})
This routine computes the product @math{y \exp(x)} for the quantities
@var{x}, @var{y} with associated absolute errors @var{dx}, @var{dy} using the
@code{gsl_sf_result_e10} type to return a result with extended range.
@comment Exceptional Return Values: GSL_EOVRFLW, GSL_EUNDRFLW
@end deftypefun
|