Preface |
|
1 | (2) |
|
|
3 | (4) |
|
Routines available in GSL |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
5 | (1) |
|
|
5 | (1) |
|
|
6 | (1) |
|
|
6 | (1) |
|
|
7 | (8) |
|
|
7 | (1) |
|
|
7 | (1) |
|
|
8 | (1) |
|
|
8 | (2) |
|
|
10 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
Alternative optimized functions |
|
|
12 | (1) |
|
Support for different numeric types |
|
|
12 | (2) |
|
|
14 | (1) |
|
|
14 | (1) |
|
|
14 | (1) |
|
|
15 | (6) |
|
|
15 | (2) |
|
|
17 | (2) |
|
Using GSL error reporting in your own functions |
|
|
19 | (2) |
|
|
21 | (6) |
|
|
21 | (1) |
|
Infinities and Not-a-number |
|
|
22 | (1) |
|
|
22 | (1) |
|
|
23 | (1) |
|
Testing the Sign of Numbers |
|
|
24 | (1) |
|
Testing for Odd and Even Numbers |
|
|
24 | (1) |
|
Maximum and Minimum functions |
|
|
24 | (3) |
|
|
27 | (10) |
|
|
27 | (1) |
|
Properties of complex numbers |
|
|
28 | (1) |
|
Complex arithmetic operators |
|
|
29 | (2) |
|
Elementary Complex Functions |
|
|
31 | (1) |
|
Complex Trigonometric Functions |
|
|
32 | (1) |
|
Inverse Complex Trigonometric Functions |
|
|
32 | (2) |
|
Complex Hyperbolic Functions |
|
|
34 | (1) |
|
Inverse Complex Hyperbolic Functions |
|
|
35 | (1) |
|
References and Further Reading |
|
|
36 | (1) |
|
|
37 | (6) |
|
|
37 | (1) |
|
Divided Difference Representation of Polynomials |
|
|
37 | (1) |
|
|
38 | (1) |
|
|
39 | (1) |
|
General Polynomial Equations |
|
|
39 | (1) |
|
|
40 | (1) |
|
References and Further Reading |
|
|
41 | (2) |
|
|
43 | (54) |
|
|
43 | (1) |
|
|
44 | (1) |
|
|
44 | (1) |
|
Airy Functions and Derivatives |
|
|
45 | (2) |
|
|
45 | (1) |
|
Derivatives of Airy Functions |
|
|
46 | (1) |
|
|
47 | (1) |
|
Zeros of Derivatives of Airy Functions |
|
|
47 | (1) |
|
|
47 | (11) |
|
Regular Cylindrical Bessel Functions |
|
|
48 | (1) |
|
Irregular Cylindrical Bessel Functions |
|
|
48 | (1) |
|
Regular Modified Cylindrical Bessel Functions |
|
|
49 | (1) |
|
Irregular Modified Cylindrical Bessel Functions |
|
|
50 | (2) |
|
Regular Spherical Bessel Functions |
|
|
52 | (1) |
|
Irregular Spherical Bessel Functions |
|
|
53 | (1) |
|
Regular Modified Spherical Bessel Functions |
|
|
54 | (1) |
|
Irregular Modified Spherical Bessel Functions |
|
|
55 | (1) |
|
Regular Bessel Function - Fractional Order |
|
|
56 | (1) |
|
Irregular Bessel Function - Fractional Order |
|
|
56 | (1) |
|
Regular Modified Bessel Functions-Fractional Order |
|
|
56 | (1) |
|
Irregular Modified Bessel Functions-Fractional Order |
|
|
57 | (1) |
|
Zeros of Regular Bessel Functions |
|
|
57 | (1) |
|
|
58 | (1) |
|
|
58 | (3) |
|
Normalized Hydrogenic Bound States |
|
|
58 | (1) |
|
|
59 | (1) |
|
Coulomb Wave Function Normalization Constant |
|
|
60 | (1) |
|
|
61 | (1) |
|
|
61 | (1) |
|
|
61 | (1) |
|
|
62 | (1) |
|
|
62 | (1) |
|
|
62 | (1) |
|
|
63 | (1) |
|
|
63 | (1) |
|
|
63 | (1) |
|
|
64 | (1) |
|
|
64 | (3) |
|
Definition of Legendre Forms |
|
|
64 | (1) |
|
Definition of Carlson Forms |
|
|
65 | (1) |
|
Legendre Form of Complete Elliptic Integrals |
|
|
65 | (1) |
|
Legendre Form of Incomplete Elliptic Integrals |
|
|
65 | (1) |
|
|
66 | (1) |
|
Elliptic Functions (Jacobi) |
|
|
67 | (1) |
|
|
67 | (2) |
|
|
67 | (1) |
|
Complementary Error Function |
|
|
68 | (1) |
|
Log Complementary Error Function |
|
|
68 | (1) |
|
|
68 | (1) |
|
|
69 | (2) |
|
|
69 | (1) |
|
Relative Exponential Functions |
|
|
69 | (1) |
|
Exponentiation With Error Estimate |
|
|
70 | (1) |
|
|
71 | (2) |
|
|
71 | (1) |
|
|
71 | (1) |
|
|
72 | (1) |
|
|
72 | (1) |
|
|
72 | (1) |
|
|
72 | (1) |
|
|
73 | (2) |
|
Complete Fermi-Dirac Integrals |
|
|
73 | (1) |
|
Incomplete Fermi-Dirac Integrals |
|
|
74 | (1) |
|
|
75 | (4) |
|
|
79 | (1) |
|
|
80 | (2) |
|
|
82 | (1) |
|
|
82 | (1) |
|
Legendre Functions and Spherical Harmonics |
|
|
83 | (4) |
|
|
83 | (1) |
|
Associated Legendre Polynomials and Spherical Harmonics |
|
|
84 | (1) |
|
|
85 | (1) |
|
Radial Functions for Hyperbolic Space |
|
|
86 | (1) |
|
Logarithm and Related Functions |
|
|
87 | (1) |
|
|
88 | (1) |
|
|
88 | (1) |
|
|
88 | (1) |
|
|
89 | (1) |
|
|
89 | (1) |
|
|
89 | (1) |
|
|
90 | (1) |
|
|
90 | (3) |
|
Circular Trigonometric Functions |
|
|
91 | (1) |
|
Trigonometric Functions for Complex Arguments |
|
|
91 | (1) |
|
Hyperbolic Trigonometric Functions |
|
|
92 | (1) |
|
|
92 | (1) |
|
|
92 | (1) |
|
Trigonometric Functions With Error Estimates |
|
|
93 | (1) |
|
|
93 | (1) |
|
|
93 | (1) |
|
|
94 | (1) |
|
|
94 | (1) |
|
|
94 | (1) |
|
References and Further Reading |
|
|
95 | (2) |
|
|
97 | (32) |
|
|
97 | (1) |
|
|
98 | (2) |
|
|
98 | (1) |
|
Reading and writing blocks |
|
|
99 | (1) |
|
Example programs for blocks |
|
|
100 | (1) |
|
|
100 | (11) |
|
|
101 | (1) |
|
Accessing vector elements |
|
|
102 | (1) |
|
Initializing vector elements |
|
|
103 | (1) |
|
Reading and writing vectors |
|
|
103 | (1) |
|
|
104 | (3) |
|
|
107 | (1) |
|
|
108 | (1) |
|
|
108 | (1) |
|
Finding maximum and minimum elements of vectors |
|
|
109 | (1) |
|
|
110 | (1) |
|
Example programs for vectors |
|
|
110 | (1) |
|
|
111 | (16) |
|
|
112 | (1) |
|
Accessing matrix elements |
|
|
113 | (1) |
|
Initializing matrix elements |
|
|
114 | (1) |
|
Reading and writing matrices |
|
|
114 | (1) |
|
|
115 | (4) |
|
Creating row and column views |
|
|
119 | (1) |
|
|
120 | (1) |
|
|
121 | (1) |
|
Exchanging rows and columns |
|
|
121 | (1) |
|
|
122 | (1) |
|
Finding maximum and minimum elements of matrices |
|
|
123 | (1) |
|
|
124 | (1) |
|
Example programs for matrices |
|
|
124 | (3) |
|
References and Further Reading |
|
|
127 | (2) |
|
|
129 | (8) |
|
|
129 | (1) |
|
|
129 | (1) |
|
Accessing permutation elements |
|
|
130 | (1) |
|
|
131 | (1) |
|
|
131 | (1) |
|
|
132 | (1) |
|
Reading and writing permutations |
|
|
133 | (1) |
|
|
134 | (1) |
|
References and Further Reading |
|
|
135 | (2) |
|
|
137 | (8) |
|
|
137 | (1) |
|
|
138 | (2) |
|
Selecting the k-th smallest or largest elements |
|
|
140 | (1) |
|
|
141 | (1) |
|
|
142 | (1) |
|
References and Further Reading |
|
|
143 | (2) |
|
|
145 | (18) |
|
|
146 | (15) |
|
|
147 | (4) |
|
|
151 | (4) |
|
|
155 | (6) |
|
|
161 | (1) |
|
References and Further Reading |
|
|
162 | (1) |
|
|
163 | (18) |
|
|
163 | (3) |
|
|
166 | (3) |
|
QR Decomposition with Column Pivoting |
|
|
169 | (2) |
|
Singular Value Decomposition |
|
|
171 | (1) |
|
|
172 | (1) |
|
Tridiagonal Decomposition of Real Symmetric Matrices |
|
|
173 | (1) |
|
Tridiagonal Decomposition of Hermitian Matrices |
|
|
174 | (1) |
|
|
175 | (1) |
|
Householder solver for linear systems |
|
|
176 | (1) |
|
|
176 | (1) |
|
|
177 | (2) |
|
References and Further Reading |
|
|
179 | (2) |
|
|
181 | (6) |
|
|
181 | (1) |
|
Complex Hermitian Matrices |
|
|
182 | (1) |
|
Sorting Eigenvalues and Eigenvectors |
|
|
183 | (1) |
|
|
184 | (2) |
|
References and Further Reading |
|
|
186 | (1) |
|
Fast Fourier Transforms (FFTs) |
|
|
187 | (22) |
|
|
187 | (1) |
|
Overview of complex data FFTs |
|
|
188 | (1) |
|
Radix-2 FFT routines for complex data |
|
|
189 | (4) |
|
Mixed-radix FFT routines for complex data |
|
|
193 | (4) |
|
Overview of real data FFTs |
|
|
197 | (2) |
|
Radix-2 FFT routines for real data |
|
|
199 | (1) |
|
Mixed-radix FFT routines for real data |
|
|
200 | (6) |
|
References and Further Reading |
|
|
206 | (3) |
|
|
209 | (14) |
|
|
209 | (2) |
|
QNG non-adaptive Gauss-Kronrod integration |
|
|
211 | (1) |
|
|
211 | (1) |
|
QAGS adaptive integration with singularities |
|
|
212 | (1) |
|
QAGP adaptive integration with known singular points |
|
|
213 | (1) |
|
QAGI adaptive integration on infinite intervals |
|
|
214 | (1) |
|
QAWC adaptive integration for Cauchy principal values |
|
|
215 | (1) |
|
QAWS adaptive integration for singular functions |
|
|
215 | (2) |
|
QAWO adaptive integration for oscillatory functions |
|
|
217 | (1) |
|
QAWF adaptive integration for Fourier integrals |
|
|
218 | (2) |
|
|
220 | (1) |
|
|
220 | (1) |
|
References and Further Reading |
|
|
221 | (2) |
|
|
223 | (22) |
|
General comments on random numbers |
|
|
223 | (1) |
|
The Random Number Generator Interface |
|
|
224 | (1) |
|
Random number generator initialization |
|
|
224 | (1) |
|
Sampling from a random number generator |
|
|
225 | (1) |
|
Auxiliary random number generator functions |
|
|
226 | (2) |
|
Random number environment variables |
|
|
228 | (1) |
|
Saving and restoring random number generator state |
|
|
229 | (1) |
|
Random number generator algorithms |
|
|
230 | (4) |
|
Unix random number generators |
|
|
234 | (1) |
|
Numerical Recipes generators |
|
|
235 | (1) |
|
Other random number generators |
|
|
236 | (5) |
|
Random Number Generator Performance |
|
|
241 | (1) |
|
|
242 | (1) |
|
References and Further Reading |
|
|
243 | (1) |
|
|
244 | (1) |
|
|
245 | (4) |
|
Quasi-random number generator initialization |
|
|
245 | (1) |
|
Sampling from a quasi-random number generator |
|
|
245 | (1) |
|
Auxiliary quasi-random number generator functions |
|
|
246 | (1) |
|
Saving and resorting quasi-random number generator state |
|
|
246 | (1) |
|
Quasi-random number generator algorithms |
|
|
247 | (1) |
|
|
247 | (1) |
|
|
248 | (1) |
|
Random Number Distributions |
|
|
249 | (44) |
|
The Gaussian Distribution |
|
|
250 | (2) |
|
The Gaussian Tail Distribution |
|
|
252 | (2) |
|
The Bivariate Gaussian Distribution |
|
|
254 | (1) |
|
The Exponential Distribution |
|
|
255 | (1) |
|
|
256 | (1) |
|
The Exponential Power Distribution |
|
|
257 | (1) |
|
|
258 | (1) |
|
The Rayleigh Distribution |
|
|
259 | (1) |
|
The Rayleigh Tail Distribution |
|
|
260 | (1) |
|
|
261 | (1) |
|
The Levy alpha-Stable Distributions |
|
|
262 | (1) |
|
The Levy skew alpha-Stable Distribution |
|
|
263 | (1) |
|
|
264 | (1) |
|
The Flat (Uniform) Distribution |
|
|
265 | (1) |
|
The Lognormal Distribution |
|
|
266 | (1) |
|
The Chi-squared Distribution |
|
|
267 | (1) |
|
|
268 | (1) |
|
|
269 | (1) |
|
|
270 | (1) |
|
The Logistic Distribution |
|
|
271 | (1) |
|
|
272 | (1) |
|
The Spherical Distribution (2D & 3D) |
|
|
273 | (2) |
|
|
275 | (1) |
|
The Type-1 Gumbel Distribution |
|
|
276 | (1) |
|
The Type-2 Gumbel Distribution |
|
|
277 | (1) |
|
General Discrete Distributions |
|
|
278 | (2) |
|
|
280 | (1) |
|
The Bernoulli Distribution |
|
|
281 | (1) |
|
The Binomial Distribution |
|
|
282 | (1) |
|
The Negative Binomial Distribution |
|
|
283 | (1) |
|
|
284 | (1) |
|
The Geometric Distribution |
|
|
285 | (1) |
|
The Hypergeometric Distribution |
|
|
286 | (1) |
|
The Logarithmic Distribution |
|
|
287 | (1) |
|
|
288 | (1) |
|
|
289 | (2) |
|
References and Further Reading |
|
|
291 | (2) |
|
|
293 | (14) |
|
Mean, Standard Deviation and Variance |
|
|
293 | (2) |
|
|
295 | (1) |
|
Higher moments (skewness and kurtosis) |
|
|
295 | (2) |
|
|
297 | (1) |
|
|
297 | (1) |
|
|
298 | (3) |
|
Maximum and Minimum values |
|
|
301 | (1) |
|
|
302 | (1) |
|
Example statistical programs |
|
|
303 | (2) |
|
References and Further Reading |
|
|
305 | (2) |
|
|
307 | (24) |
|
|
307 | (1) |
|
|
308 | (1) |
|
|
309 | (1) |
|
Updating and accessing histogram elements |
|
|
310 | (1) |
|
Searching histogram ranges |
|
|
311 | (1) |
|
|
312 | (1) |
|
|
313 | (1) |
|
Reading and writing histograms |
|
|
314 | (1) |
|
Resampling from histograms |
|
|
315 | (1) |
|
The histogram probability distribution struct |
|
|
315 | (2) |
|
Example programs for histograms |
|
|
317 | (2) |
|
Two dimensional histograms |
|
|
319 | (1) |
|
|
319 | (1) |
|
|
320 | (1) |
|
|
321 | (1) |
|
Updating and accessing 2D histogram elements |
|
|
321 | (2) |
|
Searching 2D histogram ranges |
|
|
323 | (1) |
|
|
324 | (1) |
|
|
324 | (1) |
|
Reading and writing 2D histograms |
|
|
325 | (2) |
|
Resampling from 2D histograms |
|
|
327 | (2) |
|
Example programs for 2D histograms |
|
|
329 | (2) |
|
|
331 | (8) |
|
|
331 | (1) |
|
|
331 | (1) |
|
Opening an existing ntuple file |
|
|
332 | (1) |
|
|
332 | (1) |
|
|
332 | (1) |
|
|
332 | (1) |
|
Histogramming ntuple values |
|
|
333 | (1) |
|
|
334 | (3) |
|
References and Further Reading |
|
|
337 | (2) |
|
|
339 | (14) |
|
|
339 | (2) |
|
|
341 | (1) |
|
|
342 | (3) |
|
|
345 | (4) |
|
|
349 | (3) |
|
References and Further Reading |
|
|
352 | (1) |
|
|
353 | (10) |
|
Simulated Annealing algorithm |
|
|
353 | (1) |
|
Simulated Annealing functions |
|
|
354 | (2) |
|
Examples with Simulated Annealing |
|
|
356 | (7) |
|
|
356 | (3) |
|
Traveling Salesman Problem |
|
|
359 | (4) |
|
Ordinary Differential Equations |
|
|
363 | (10) |
|
|
363 | (1) |
|
|
364 | (2) |
|
Adaptive Step-size Control |
|
|
366 | (2) |
|
|
368 | (1) |
|
|
369 | (3) |
|
References and Further Reading |
|
|
372 | (1) |
|
|
373 | (8) |
|
|
373 | (1) |
|
|
373 | (1) |
|
|
374 | (1) |
|
Index Look-up and Acceleration |
|
|
375 | (1) |
|
Evaluation of interpolating functions |
|
|
376 | (1) |
|
|
377 | (1) |
|
|
378 | (1) |
|
References and Further Reading |
|
|
379 | (2) |
|
Numerical Differentiation |
|
|
381 | (4) |
|
|
381 | (1) |
|
|
382 | (1) |
|
References and Further Reading |
|
|
383 | (2) |
|
|
385 | (4) |
|
The gsl_cheb_series struct |
|
|
385 | (1) |
|
Creation and Calculation of Chebyshev Series |
|
|
385 | (1) |
|
Chebyshev Series Evaluation |
|
|
386 | (1) |
|
Derivatives and Integrals |
|
|
386 | (1) |
|
|
387 | (1) |
|
References and Further Reading |
|
|
388 | (1) |
|
|
389 | (6) |
|
|
389 | (1) |
|
Acceleration functions without error estimation |
|
|
390 | (1) |
|
Example of accelerating a series |
|
|
391 | (2) |
|
References and Further Reading |
|
|
393 | (2) |
|
Discrete Hankel Transforms |
|
|
395 | (2) |
|
|
395 | (1) |
|
|
396 | (1) |
|
References and Further Reading |
|
|
396 | (1) |
|
One dimensional Root-Finding |
|
|
397 | (18) |
|
|
397 | (1) |
|
|
398 | (1) |
|
|
399 | (1) |
|
Providing the function to solve |
|
|
400 | (3) |
|
Search Bounds and Guesses |
|
|
403 | (1) |
|
|
403 | (1) |
|
Search Stopping Parameters |
|
|
404 | (1) |
|
Root Bracketing Algorithms |
|
|
405 | (2) |
|
Root Finding Algorithms using Derivatives |
|
|
407 | (2) |
|
|
409 | (5) |
|
References and Further Reading |
|
|
414 | (1) |
|
One dimensional Minimization |
|
|
415 | (10) |
|
|
415 | (1) |
|
|
416 | (1) |
|
Initializing the Minimizer |
|
|
417 | (1) |
|
Providing the function to minimize |
|
|
418 | (1) |
|
|
418 | (1) |
|
|
419 | (1) |
|
|
420 | (1) |
|
|
421 | (2) |
|
References and Further Reading |
|
|
423 | (2) |
|
Multidimensional Root-Finding |
|
|
425 | (18) |
|
|
425 | (1) |
|
|
426 | (2) |
|
Providing the function to solve |
|
|
428 | (3) |
|
|
431 | (1) |
|
Search Stopping Parameters |
|
|
432 | (1) |
|
Algorithms using Derivatives |
|
|
433 | (2) |
|
Algorithms without Derivatives |
|
|
435 | (1) |
|
|
436 | (5) |
|
References and Further Reading |
|
|
441 | (2) |
|
Multidimensional Minimization |
|
|
443 | (10) |
|
|
443 | (1) |
|
|
444 | (1) |
|
Initializing the Multidimensional Minimizer |
|
|
444 | (1) |
|
Providing a function to minimize |
|
|
445 | (2) |
|
|
447 | (1) |
|
|
448 | (1) |
|
|
449 | (1) |
|
|
450 | (2) |
|
References and Further Reading |
|
|
452 | (1) |
|
|
453 | (12) |
|
|
453 | (1) |
|
Linear fitting without a constant term |
|
|
454 | (1) |
|
|
455 | (2) |
|
|
457 | (6) |
|
References and Further Reading |
|
|
463 | (2) |
|
Nonlinear Least-Squares Fitting |
|
|
465 | (14) |
|
|
465 | (1) |
|
|
466 | (1) |
|
Providing the Function to be Minimized |
|
|
467 | (1) |
|
|
468 | (1) |
|
Search Stopping Parameters |
|
|
469 | (1) |
|
Minimization Algorithms using Derivatives |
|
|
470 | (1) |
|
Minimization Algorithms without Derivatives |
|
|
471 | (1) |
|
Computing the covariance matrix of best fit parameters |
|
|
472 | (1) |
|
|
472 | (5) |
|
References and Further Reading |
|
|
477 | (2) |
|
|
479 | (8) |
|
|
479 | (1) |
|
Astronomy and Astrophysics |
|
|
480 | (1) |
|
Atomic and Nuclear Physics |
|
|
480 | (1) |
|
|
481 | (1) |
|
|
481 | (1) |
|
|
482 | (1) |
|
|
482 | (1) |
|
|
482 | (1) |
|
|
483 | (1) |
|
|
483 | (1) |
|
|
484 | (1) |
|
|
484 | (1) |
|
|
484 | (1) |
|
|
485 | (1) |
|
|
485 | (1) |
|
References and Further Reading |
|
|
486 | (1) |
|
IEEE floating-point arithmetic |
|
|
487 | (8) |
|
Representation of floating point numbers |
|
|
487 | (2) |
|
Setting up your IEEE environment |
|
|
489 | (4) |
|
References and Further Reading |
|
|
493 | (2) |
Appendix A Debugging Numerical Programs |
|
495 | (6) |
|
|
495 | (2) |
|
A.2 Examining floating point registers |
|
|
497 | (1) |
|
A.3 Handling floating point exceptions |
|
|
497 | (1) |
|
A.4 GCC warning options for numerical programs |
|
|
498 | (2) |
|
A.5 References and Further Reading |
|
|
500 | (1) |
Appendix B Contributors to GSL |
|
501 | (2) |
Appendix C Autoconf Macros |
|
503 | (2) |
Appendix D GSL CBLAS Library |
|
505 | (20) |
|
|
505 | (3) |
|
|
508 | (9) |
|
|
517 | (5) |
|
|
522 | (3) |
GNU General Public License |
|
525 | (10) |
|
|
525 | (1) |
|
Terms and Conditions for Copying, Distribution and Modification |
|
|
526 | (6) |
|
Appendix: How to Apply These Terms to Your New Programs |
|
|
532 | (3) |
GNU Free Documentation License |
|
535 | (10) |
|
Addendum: How to use this License for your documents |
|
|
543 | (2) |
Other Scientific Packages for the GNU System |
|
545 | (4) |
|
|
545 | (1) |
|
|
545 | (2) |
|
GNU Multiprecision Library |
|
|
547 | (1) |
|
GNU Linear Programming Kit |
|
|
547 | (2) |
Function Index |
|
549 | (18) |
Variable Index |
|
567 | (2) |
Type Index |
|
569 | (2) |
Concept Index |
|
571 | |