did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780954161736

Gnu Scientific Library: Reference Manual

by
  • ISBN13:

    9780954161736

  • ISBN10:

    0954161734

  • Edition: 2nd
  • Format: Paperback
  • Copyright: 2003-02-01
  • Publisher: Lightning Source Inc
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $39.99

Summary

The GNU Scientific Library (GSL) is a free numerical library for C and C++ programmers. It provides over 1,000 routines for solving mathematical problems in science and engineering. Written by the developers of GSL this reference manual is the definitive guide to the library. The GNU Scientific Library is free software, distributed under the GNU General Public License (GPL). It is available for GNU (GNU/Linux), Unix and Microsoft Windows systems. All the money raised from the sale of this book supports the development of the GNU Scientific Library. This is the second edition of the manual, and corresponds to version 1.3 of the library.

Table of Contents

Preface 1(2)
Introduction
3(6)
Routines available in GSL
3(1)
GSL is Free Software
4(1)
Obtaining GSL
5(1)
An Example Program
5(1)
No Warranty
6(1)
Reporting Bugs
6(1)
Further Information
6(1)
How to Help
7(2)
Using the library
9(8)
ANSI C Compliance
9(1)
Compiling and Linking
9(1)
Shared Libraries
10(1)
Inline functions
11(1)
Long double
11(1)
Portability functions
12(1)
Alternative optimized functions
12(1)
Support for different numeric types
13(1)
Compatibility with C++
14(1)
Aliasing of arrays
14(1)
Thread-safety
15(1)
Code Reuse
15(2)
Error Handling
17(6)
Error Reporting
17(1)
Error Codes
18(1)
Error Handlers
19(2)
Using GSL error reporting in your own functions
21(1)
Examples
22(1)
Mathematical Functions
23(6)
Mathematical Constants
23(1)
Infinities and Not-a-number
24(1)
Elementary Functions
24(1)
Small integer powers
25(1)
Testing the Sign of Numbers
26(1)
Testing for Odd and Even Numbers
26(1)
Maximum and Minimum functions
27(1)
Approximate Comparison of Floating Point Numbers
28(1)
Complex Numbers
29(10)
Complex numbers
29(1)
Properties of complex numbers
30(1)
Complex arithmetic operators
31(2)
Elementary Complex Functions
33(1)
Complex Trigonometric Functions
34(1)
Inverse Complex Trigonometric Functions
34(2)
Complex Hyperbolic Functions
36(1)
Inverse Complex Hyperbolic Functions
36(1)
References and Further Reading
37(2)
Polynomials
39(6)
Polynomial Evaluation
39(1)
Divided Difference Representation of Polynomials
39(1)
Quadratic Equations
40(1)
Cubic Equations
41(1)
General Polynomial Equations
41(1)
Examples
42(1)
References and Further Reading
43(2)
Special Functions
45(54)
Usage
45(1)
The gsl_sf_result struct
46(1)
Modes
46(1)
Airy Functions and Derivatives
47(2)
Airy Functions
47(1)
Derivatives of Airy Functions
48(1)
Zeros of Airy Functions
49(1)
Zeros of Derivatives of Airy Functions
49(1)
Bessel Functions
49(11)
Regular Cylindrical Bessel Functions
50(1)
Irregular Cylindrical Bessel Functions
50(1)
Regular Modified Cylindrical Bessel Functions
51(1)
Irregular Modified Cylindrical Bessel Functions
52(2)
Regular Spherical Bessel Functions
54(1)
Irregular Spherical Bessel Functions
55(1)
Regular Modified Spherical Bessel Functions
56(1)
Irregular Modified Spherical Bessel Functions
57(1)
Regular Bessel Function - Fractional Order
58(1)
Irregular Bessel Functions - Fractional Order
58(1)
Regular Modified Bessel Functions - Fractional Order
58(1)
Irregular Modified Bessel Functions - Fractional Order
59(1)
Zeros of Regular Bessel Functions
59(1)
Clausen Functions
60(1)
Coulomb Functions
60(3)
Normalized Hydrogenic Bound States
60(1)
Coulomb Wave Functions
61(1)
Coulomb Wave Function Normalization Constant
62(1)
Coupling Coefficients
63(1)
3-j Symbols
63(1)
6-j Symbols
63(1)
9-j Symbols
64(1)
Dawson Function
64(1)
Debye Functions
64(1)
Dilogarithm
65(1)
Real Argument
65(1)
Complex Argument
65(1)
Elementary Operations
66(1)
Elliptic Integrals
66(3)
Definition of Legendre Forms
66(1)
Definition of Carlson Forms
67(1)
Legendre Form of Complete Elliptic Integrals
67(1)
Legendre Form of Incomplete Elliptic Integrals
68(1)
Carlson Forms
69(1)
Elliptic Functions (Jacobi)
69(1)
Error Functions
70(1)
Error Function
70(1)
Complementary Error Function
70(1)
Log Complementary Error Function
70(1)
Probability functions
70(1)
Exponential Functions
71(2)
Exponential Function
71(1)
Relative Exponential Functions
71(1)
Exponentiation With Error Estimate
72(1)
Exponential Integrals
73(2)
Exponential Integral
73(1)
Ei(x)
73(1)
Hyperbolic Integrals
74(1)
Ei_3(x)
74(1)
Trigonometric Integrals
74(1)
Arctangent Integral
74(1)
Fermi-Dirac Function
75(1)
Complete Fermi-Dirac Integrals
75(1)
Incomplete Fermi-Dirac Integrals
76(1)
Gamma Function
76(5)
Gegenbauer Functions
81(1)
Hypergeometric Functions
82(2)
Laguerre Functions
84(1)
Lambert W Functions
85(1)
Legendre Functions and Spherical Harmonics
85(4)
Legendre Polynomials
85(1)
Associated Legendre Polynomials and Spherical Harmonics
86(1)
Conical Functions
87(1)
Radial Functions for Hyperbolic Space
88(1)
Logarithm and Related Functions
89(1)
Power Function
90(1)
Psi (Digamma) Function
91(1)
Digamma Function
91(1)
Trigamma Function
91(1)
Polygamma Function
91(1)
Synchrotron Functions
92(1)
Transport Functions
92(1)
Trigonometric Functions
93(2)
Circular Trigonometric Functions
93(1)
Trigonometric Functions for Complex Arguments
93(1)
Hyperbolic Trigonometric Functions
94(1)
Conversion Functions
94(1)
Restriction Functions
94(1)
Trigonometric Functions With Error Estimates
95(1)
Zeta Functions
95(1)
Riemann Zeta Function
95(1)
Hurwitz Zeta Function
96(1)
Eta Function
96(1)
Examples
96(2)
References and Further Reading
98(1)
Vectors and Matrices
99(32)
Data types
99(1)
Blocks
100(2)
Block allocation
100(1)
Reading and writing blocks
101(1)
Example programs for blocks
102(1)
Vectors
102(12)
Vector allocation
103(1)
Accessing vector elements
104(1)
Initializing vector elements
105(1)
Reading and writing vectors
105(1)
Vector views
106(3)
Copying vectors
109(1)
Exchanging elements
109(1)
Vector operations
110(1)
Finding maximum and minimum elements of vectors
111(1)
Vector properties
111(1)
Example programs for vectors
112(2)
Matrices
114(15)
Matrix allocation
115(1)
Accessing matrix elements
115(1)
Initializing matrix elements
116(1)
Reading and writing matrices
117(1)
Matrix views
118(3)
Creating row and column views
121(1)
Copying matrices
122(1)
Copying rows and columns
123(1)
Exchanging rows and columns
123(1)
Matrix operations
124(1)
Finding maximum and minimum elements of matrices
125(1)
Matrix properties
126(1)
Example programs for matrices
126(3)
References and Further Reading
129(2)
Permutations
131(10)
The Permutation struct
131(1)
Permutation allocation
131(1)
Accessing permutation elements
132(1)
Permutation properties
133(1)
Permutation functions
133(1)
Applying Permutations
134(1)
Reading and writing permutations
135(1)
Permutations in Cyclic Form
136(1)
Examples
137(2)
References and Further Reading
139(2)
Combinations
141(6)
The Combination struct
141(1)
Combination allocation
141(1)
Accessing combination elements
142(1)
Combination properties
142(1)
Combination functions
143(1)
Reading and writing combinations
143(1)
Examples
144(3)
Sorting
147(8)
Sorting objects
147(2)
Sorting vectors
149(1)
Selecting the k-th smallest or largest elements
150(1)
Computing the rank
151(1)
Examples
152(2)
References and Further Reading
154(1)
BLAS Support
155(18)
GSL BLAS Interface
157(13)
Level 1
157(4)
Level 2
161(4)
Level 3
165(5)
Examples
170(1)
References and Further Reading
171(2)
Linear Algebra
173(18)
LU Decomposition
173(3)
QR Decomposition
176(2)
QR Decomposition with Column Pivoting
178(2)
Singular Value Decomposition
180(2)
Cholesky Decomposition
182(1)
Tridiagonal Decomposition of Real Symmetric Matrices
183(1)
Tridiagonal Decomposition of Hermitian Matrices
184(1)
Bidiagonalization
185(1)
Householder solver for linear systems
186(1)
Tridiagonal Systems
186(1)
Examples
187(1)
References and Further Reading
188(3)
Eigensystems
191(6)
Real Symmetric Matrices
191(1)
Complex Hermitian Matrices
192(1)
Sorting Eigenvalues and Eigenvectors
193(1)
Examples
194(2)
References and Further Reading
196(1)
Fast Fourier Transforms (FFTs)
197(22)
Mathematical Definitions
197(1)
Overview of complex data FFTs
198(1)
Radix-2 FFT routines for complex data
199(4)
Mixed-radix FFT routines for complex data
203(5)
Overview of real data FFTs
208(1)
Radix-2 FFT routines for real data
209(1)
Mixed-radix FFT routines for real data
210(7)
References and Further Reading
217(2)
Numerical Integration
219(14)
Introduction
219(2)
QNG non-adaptive Gauss-Kronrod integration
221(1)
QAG adaptive integration
221(1)
QAGS adaptive integration with singularities
222(1)
QAGP adaptive integration with known singular points
223(1)
QAGI adaptive integration on infinite intervals
224(1)
QAWC adaptive integration for Cauchy principal values
225(1)
QAWS adaptive integration for singular functions
225(2)
QAWO adaptive integration for oscillatory functions
227(1)
QAWF adaptive integration for Fourier integrals
228(2)
Error codes
230(1)
Examples
230(1)
References and Further Reading
231(2)
Random Number Generation
233(20)
General comments on random numbers
233(1)
The Random Number Generator Interface
234(1)
Random number generator initialization
234(1)
Sampling from a random number generator
235(1)
Auxiliary random number generator functions
236(1)
Random number environment variables
237(2)
Saving and restoring random number generator state
239(1)
Random number generator algorithms
239(4)
Unix random number generators
243(2)
Other random number generators
245(5)
Performance
250(1)
Examples
250(2)
References and Further Reading
252(1)
Acknowledgements
252(1)
Quasi-Random Sequences
253(6)
Quasi-random number generator initialization
253(1)
Sampling from a quasi-random number generator
253(1)
Auxiliary quasi-random number generator functions
254(1)
Saving and resorting quasi-random number generator state
254(1)
Quasi-random number generator algorithms
255(1)
Examples
255(2)
References
257(2)
Random Number Distributions
259(46)
The Gaussian Distribution
260(2)
The Gaussian Tail Distribution
262(2)
The Bivariate Gaussian Distribution
264(1)
The Exponential Distribution
265(1)
The Laplace Distribution
266(1)
The Exponential Power Distribution
267(1)
The Cauchy Distribution
268(1)
The Rayleigh Distribution
269(1)
The Rayleigh Tail Distribution
270(1)
The Landau Distribution
271(1)
The Levy alpha-Stable Distributions
272(1)
The Levy skew alpha-Stable Distribution
273(1)
The Gamma Distribution
274(1)
The Flat (Uniform) Distribution
275(1)
The Lognormal Distribution
276(1)
The Chi-squared Distribution
277(1)
The F-distribution
278(1)
The t-distribution
279(1)
The Beta Distribution
280(1)
The Logistic Distribution
281(1)
The Pareto Distribution
282(1)
The Spherical Distribution (2D & 3D)
283(2)
The Weibull Distribution
285(1)
The Type-1 Gumbel Distribution
286(1)
The Type-2 Gumbel Distribution
287(1)
The Dirichlet Distribution
288(1)
General Discrete Distributions
289(2)
The Poisson Distribution
291(1)
The Bernoulli Distribution
292(1)
The Binomial Distribution
293(1)
The Multinomial Distribution
294(1)
The Negative Binomial Distribution
295(1)
The Pascal Distribution
296(1)
The Geometric Distribution
297(1)
The Hypergeometric Distribution
298(1)
The Logarithmic Distribution
299(1)
Shuffling and Sampling
300(1)
Examples
301(3)
References and Further Reading
304(1)
Statistics
305(12)
Mean, Standard Deviation and Variance
305(2)
Absolute deviation
307(1)
Higher moments (skewness and kurtosis)
307(1)
Autocorrelation
308(1)
Covariance
309(1)
Weighted Samples
309(3)
Maximum and Minimum values
312(1)
Median and Percentiles
313(1)
Example statistical programs
314(2)
References and Further Reading
316(1)
Histograms
317(24)
The histogram struct
317(1)
Histogram allocation
318(1)
Copying Histograms
319(1)
Updating and accessing histogram elements
320(1)
Searching histogram ranges
321(1)
Histogram Statistics
321(2)
Histogram Operations
323(1)
Reading and writing histograms
324(1)
Resampling from histograms
325(1)
The histogram probability distribution struct
325(2)
Example programs for histograms
327(2)
Two dimensional histograms
329(1)
The 2D histogram struct
329(1)
2D Histogram allocation
330(1)
Copying 2D Histograms
331(1)
Updating and accessing 2D histogram elements
331(2)
Searching 2D histogram ranges
333(1)
2D Histogram Statistics
333(2)
2D Histogram Operations
335(1)
Reading and writing 2D histograms
336(1)
Resampling from 2D histograms
337(2)
Example programs for 2D histograms
339(2)
N-tuples
341(8)
The ntuple struct
341(1)
Creating ntuples
341(1)
Opening an existing ntuple file
342(1)
Writing ntuples
342(1)
Reading ntuples
342(1)
Closing an ntuple file
342(1)
Histogramming ntuple values
343(1)
Example programs
344(3)
References and Further Reading
347(2)
Monte Carlo Integration
349(14)
Interface
349(2)
PLAIN Monte Carlo
351(1)
MISER
352(2)
VEGAS
354(4)
Examples
358(4)
References and Further Reading
362(1)
Simulated Annealing
363(12)
Simulated Annealing algorithm
363(1)
Simulated Annealing functions
364(2)
Examples with Simulated Annealing
366(9)
Trivial example
366(4)
Traveling Salesman Problem
370(5)
Ordinary Differential Equations
375(12)
Defining the ODE System
375(1)
Stepping Functions
376(2)
Adaptive Step-size Control
378(2)
Evolution
380(1)
Examples
381(4)
References and Further Reading
385(2)
Interpolation
387(8)
Introduction
387(1)
Interpolation Functions
387(1)
Interpolation Types
388(1)
Index Look-up and Acceleration
389(1)
Evaluation of Interpolating Functions
389(1)
Higher-level Interface
390(1)
Examples
391(2)
References and Further Reading
393(2)
Numerical Differentiation
395(4)
Functions
395(1)
Examples
396(1)
References and Further Reading
397(2)
Chebyshev Approximations
399(4)
The gsl_cheb_series struct
399(1)
Creation and Calculation of Chebyshev Series
399(1)
Chebyshev Series Evaluation
400(1)
Derivatives and Integrals
400(1)
Examples
401(1)
References and Further Reading
402(1)
Series Acceleration
403(6)
Acceleration functions
403(1)
Acceleration functions without error estimation
404(1)
Example of accelerating a series
405(2)
References and Further Reading
407(2)
Discrete Hankel Transforms
409(2)
Definitions
409(1)
Functions
410(1)
References and Further Reading
410(1)
One dimensional Root-Finding
411(18)
Overview
411(1)
Caveats
412(1)
Initializing the Solver
412(2)
Providing the function to solve
414(2)
Search Bounds and Guesses
416(1)
Iteration
417(1)
Search Stopping Parameters
418(1)
Root Bracketing Algorithms
419(2)
Root Finding Algorithms using Derivatives
421(2)
Examples
423(5)
References and Further Reading
428(1)
One dimensional Minimization
429(10)
Overview
429(1)
Caveats
430(1)
Initializing the Minimizer
431(1)
Providing the function to minimize
432(1)
Iteration
432(1)
Stopping Parameters
433(1)
Minimization Algorithms
434(1)
Examples
435(2)
References and Further Reading
437(2)
Multidimensional Root-Finding
439(18)
Overview
439(1)
Initializing the Solver
440(2)
Providing the function to solve
442(3)
Iteration
445(1)
Search Stopping Parameters
446(1)
Algorithms using Derivatives
447(2)
Algorithms without Derivatives
449(1)
Examples
450(6)
References and Further Reading
456(1)
Multidimensional Minimization
457(16)
Overview
457(1)
Caveats
458(1)
Initializing the Multidimensional Minimizer
458(2)
Providing a function to minimize
460(2)
Iteration
462(1)
Stopping Criteria
463(1)
Algorithms
464(2)
Examples
466(5)
References and Further Reading
471(2)
Least-Squares Fitting
473(12)
Linear regression
473(1)
Linear fitting without a constant term
474(1)
Multi-parameter fitting
475(2)
Examples
477(6)
References and Further Reading
483(2)
Nonlinear Least-Squares Fitting
485(14)
Overview
485(1)
Initializing the Solver
486(1)
Providing the Function to be Minimized
487(1)
Iteration
488(1)
Search Stopping Parameters
489(1)
Minimization Algorithms using Derivatives
490(1)
Minimization Algorithms without Derivatives
491(1)
Computing the covariance matrix of best fit parameters
491(1)
Examples
492(5)
References and Further Reading
497(2)
Physical Constants
499(10)
Fundamental Constants
499(1)
Astronomy and Astrophysics
500(1)
Atomic and Nuclear Physics
500(1)
Measurement of Time
501(1)
Imperial Units
502(1)
Nautical Units
502(1)
Printers Units
502(1)
Volume
503(1)
Mass and Weight
503(1)
Thermal Energy and Power
504(1)
Pressure
504(1)
Viscosity
505(1)
Light and Illumination
505(1)
Radioactivity
505(1)
Force and Energy
506(1)
Prefixes
506(1)
Examples
507(1)
References and Further Reading
508(1)
IEEE floating-point arithmetic
509(8)
Representation of floating point numbers
509(2)
Setting up your IEEE environment
511(4)
References and Further Reading
515(2)
Appendix A Debugging Numerical Programs
517(6)
A.1 Using gdb
517(2)
A.2 Examining floating point registers
519(1)
A.3 Handling floating point exceptions
519(1)
A.4 GCC warning options for numerical programs
520(2)
A.5 References and Further Reading
522(1)
Appendix B Contributors to GSL
523(2)
Appendix C Autoconf Macros
525(4)
C.1 Using autoconf to link with GSL
525(1)
C.2 Using autoconf to test for inline
526(1)
C.3 Using autoconf to substitute portability functions
527(2)
Appendix D GSL CBLAS Library
529(20)
D.1 Level 1
529(3)
D.2 Level 2
532(9)
D.3 Level 3
541(5)
D.4 Examples
546(3)
GNU General Public License
549(10)
Preamble
549(1)
Terms and Conditions for Copying, Distribution and Modification
550(6)
Appendix: How to Apply These Terms to Your New Programs
556(3)
GNU Free Documentation License
559(8)
Addendum: How to use this License for your documents
566(1)
Function Index 567(20)
Variable Index 587(2)
Type Index 589(2)
Concept Index 591

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program