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