summaryrefslogtreecommitdiff
path: root/gsl-1.9/doc/randist.texi
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-04-08 17:33:11 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-04-08 17:33:11 +0000
commit73f643f3f4a55310b2c8c1a9858906b2dd676e72 (patch)
treeb1df97f18dace4a5702b0bc7aafdfee8a2f25ada /gsl-1.9/doc/randist.texi
parentee523abdace8337d05ec4a179fcdf5de3fe0f634 (diff)
2011-04-08 Joel Sherrill <joel.sherrill@oarcorp.com>
* AUTHORS, BUGS, COPYING, ChangeLog, INSTALL, Makefile.am, Makefile.in, NEWS, README, SUPPORT, THANKS, TODO, acconfig.h, aclocal.m4, autogen.sh, config.guess, config.h.in, config.sub, configure, configure.ac, gsl-config.in, gsl-histogram.c, gsl-randist.c, gsl.m4, gsl.pc.in, gsl.spec.in, gsl_machine.h, gsl_math.h, gsl_mode.h, gsl_nan.h, gsl_pow_int.h, gsl_precision.h, gsl_types.h, gsl_version.h.in, install-sh, ltmain.sh, mdate-sh, missing, mkinstalldirs, templates_off.h, templates_on.h, test_gsl_histogram.sh, version.c, blas/ChangeLog, blas/Makefile.am, blas/Makefile.in, blas/TODO, blas/blas.c, blas/gsl_blas.h, blas/gsl_blas_types.h, block/ChangeLog, block/Makefile.am, block/Makefile.in, block/block.c, block/block_source.c, block/file.c, block/fprintf_source.c, block/fwrite_source.c, block/gsl_block.h, block/gsl_block_char.h, block/gsl_block_complex_double.h, block/gsl_block_complex_float.h, block/gsl_block_complex_long_double.h, block/gsl_block_double.h, block/gsl_block_float.h, block/gsl_block_int.h, block/gsl_block_long.h, block/gsl_block_long_double.h, block/gsl_block_short.h, block/gsl_block_uchar.h, block/gsl_block_uint.h, block/gsl_block_ulong.h, block/gsl_block_ushort.h, block/gsl_check_range.h, block/init.c, block/init_source.c, block/test.c, block/test_complex_io.c, block/test_complex_source.c, block/test_io.c, block/test_source.c, bspline/ChangeLog, bspline/Makefile.am, bspline/Makefile.in, bspline/TODO, bspline/bspline.c, bspline/gsl_bspline.h, bspline/test.c, cblas/ChangeLog, cblas/Makefile.am, cblas/Makefile.in, cblas/TODO, cblas/caxpy.c, cblas/cblas.h, cblas/ccopy.c, cblas/cdotc_sub.c, cblas/cdotu_sub.c, cblas/cgbmv.c, cblas/cgemm.c, cblas/cgemv.c, cblas/cgerc.c, cblas/cgeru.c, cblas/chbmv.c, cblas/chemm.c, cblas/chemv.c, cblas/cher.c, cblas/cher2.c, cblas/cher2k.c, cblas/cherk.c, cblas/chpmv.c, cblas/chpr.c, cblas/chpr2.c, cblas/cscal.c, cblas/csscal.c, cblas/cswap.c, cblas/csymm.c, cblas/csyr2k.c, cblas/csyrk.c, cblas/ctbmv.c, cblas/ctbsv.c, cblas/ctpmv.c, cblas/ctpsv.c, cblas/ctrmm.c, cblas/ctrmv.c, cblas/ctrsm.c, cblas/ctrsv.c, cblas/dasum.c, cblas/daxpy.c, cblas/dcopy.c, cblas/ddot.c, cblas/dgbmv.c, cblas/dgemm.c, cblas/dgemv.c, cblas/dger.c, cblas/dnrm2.c, cblas/drot.c, cblas/drotg.c, cblas/drotm.c, cblas/drotmg.c, cblas/dsbmv.c, cblas/dscal.c, cblas/dsdot.c, cblas/dspmv.c, cblas/dspr.c, cblas/dspr2.c, cblas/dswap.c, cblas/dsymm.c, cblas/dsymv.c, cblas/dsyr.c, cblas/dsyr2.c, cblas/dsyr2k.c, cblas/dsyrk.c, cblas/dtbmv.c, cblas/dtbsv.c, cblas/dtpmv.c, cblas/dtpsv.c, cblas/dtrmm.c, cblas/dtrmv.c, cblas/dtrsm.c, cblas/dtrsv.c, cblas/dzasum.c, cblas/dznrm2.c, cblas/gsl_cblas.h, cblas/hypot.c, cblas/icamax.c, cblas/idamax.c, cblas/isamax.c, cblas/izamax.c, cblas/sasum.c, cblas/saxpy.c, cblas/scasum.c, cblas/scnrm2.c, cblas/scopy.c, cblas/sdot.c, cblas/sdsdot.c, cblas/sgbmv.c, cblas/sgemm.c, cblas/sgemv.c, cblas/sger.c, cblas/snrm2.c, cblas/source_asum_c.h, cblas/source_asum_r.h, cblas/source_axpy_c.h, cblas/source_axpy_r.h, cblas/source_copy_c.h, cblas/source_copy_r.h, cblas/source_dot_c.h, cblas/source_dot_r.h, cblas/source_gbmv_c.h, cblas/source_gbmv_r.h, cblas/source_gemm_c.h, cblas/source_gemm_r.h, cblas/source_gemv_c.h, cblas/source_gemv_r.h, cblas/source_ger.h, cblas/source_gerc.h, cblas/source_geru.h, cblas/source_hbmv.h, cblas/source_hemm.h, cblas/source_hemv.h, cblas/source_her.h, cblas/source_her2.h, cblas/source_her2k.h, cblas/source_herk.h, cblas/source_hpmv.h, cblas/source_hpr.h, cblas/source_hpr2.h, cblas/source_iamax_c.h, cblas/source_iamax_r.h, cblas/source_nrm2_c.h, cblas/source_nrm2_r.h, cblas/source_rot.h, cblas/source_rotg.h, cblas/source_rotm.h, cblas/source_rotmg.h, cblas/source_sbmv.h, cblas/source_scal_c.h, cblas/source_scal_c_s.h, cblas/source_scal_r.h, cblas/source_spmv.h, cblas/source_spr.h, cblas/source_spr2.h, cblas/source_swap_c.h, cblas/source_swap_r.h, cblas/source_symm_c.h, cblas/source_symm_r.h, cblas/source_symv.h, cblas/source_syr.h, cblas/source_syr2.h, cblas/source_syr2k_c.h, cblas/source_syr2k_r.h, cblas/source_syrk_c.h, cblas/source_syrk_r.h, cblas/source_tbmv_c.h, cblas/source_tbmv_r.h, cblas/source_tbsv_c.h, cblas/source_tbsv_r.h, cblas/source_tpmv_c.h, cblas/source_tpmv_r.h, cblas/source_tpsv_c.h, cblas/source_tpsv_r.h, cblas/source_trmm_c.h, cblas/source_trmm_r.h, cblas/source_trmv_c.h, cblas/source_trmv_r.h, cblas/source_trsm_c.h, cblas/source_trsm_r.h, cblas/source_trsv_c.h, cblas/source_trsv_r.h, cblas/srot.c, cblas/srotg.c, cblas/srotm.c, cblas/srotmg.c, cblas/ssbmv.c, cblas/sscal.c, cblas/sspmv.c, cblas/sspr.c, cblas/sspr2.c, cblas/sswap.c, cblas/ssymm.c, cblas/ssymv.c, cblas/ssyr.c, cblas/ssyr2.c, cblas/ssyr2k.c, cblas/ssyrk.c, cblas/stbmv.c, cblas/stbsv.c, cblas/stpmv.c, cblas/stpsv.c, cblas/strmm.c, cblas/strmv.c, cblas/strsm.c, cblas/strsv.c, cblas/test.c, cblas/test_amax.c, cblas/test_asum.c, cblas/test_axpy.c, cblas/test_copy.c, cblas/test_dot.c, cblas/test_gbmv.c, cblas/test_gemm.c, cblas/test_gemv.c, cblas/test_ger.c, cblas/test_hbmv.c, cblas/test_hemm.c, cblas/test_hemv.c, cblas/test_her.c, cblas/test_her2.c, cblas/test_her2k.c, cblas/test_herk.c, cblas/test_hpmv.c, cblas/test_hpr.c, cblas/test_hpr2.c, cblas/test_nrm2.c, cblas/test_rot.c, cblas/test_rotg.c, cblas/test_rotm.c, cblas/test_rotmg.c, cblas/test_sbmv.c, cblas/test_scal.c, cblas/test_spmv.c, cblas/test_spr.c, cblas/test_spr2.c, cblas/test_swap.c, cblas/test_symm.c, cblas/test_symv.c, cblas/test_syr.c, cblas/test_syr2.c, cblas/test_syr2k.c, cblas/test_syrk.c, cblas/test_tbmv.c, cblas/test_tbsv.c, cblas/test_tpmv.c, cblas/test_tpsv.c, cblas/test_trmm.c, cblas/test_trmv.c, cblas/test_trsm.c, cblas/test_trsv.c, cblas/tests.c, cblas/tests.h, cblas/xerbla.c, cblas/zaxpy.c, cblas/zcopy.c, cblas/zdotc_sub.c, cblas/zdotu_sub.c, cblas/zdscal.c, cblas/zgbmv.c, cblas/zgemm.c, cblas/zgemv.c, cblas/zgerc.c, cblas/zgeru.c, cblas/zhbmv.c, cblas/zhemm.c, cblas/zhemv.c, cblas/zher.c, cblas/zher2.c, cblas/zher2k.c, cblas/zherk.c, cblas/zhpmv.c, cblas/zhpr.c, cblas/zhpr2.c, cblas/zscal.c, cblas/zswap.c, cblas/zsymm.c, cblas/zsyr2k.c, cblas/zsyrk.c, cblas/ztbmv.c, cblas/ztbsv.c, cblas/ztpmv.c, cblas/ztpsv.c, cblas/ztrmm.c, cblas/ztrmv.c, cblas/ztrsm.c, cblas/ztrsv.c, cdf/ChangeLog, cdf/Makefile.am, cdf/Makefile.in, cdf/beta.c, cdf/beta_inc.c, cdf/betainv.c, cdf/binomial.c, cdf/cauchy.c, cdf/cauchyinv.c, cdf/chisq.c, cdf/chisqinv.c, cdf/error.h, cdf/exponential.c, cdf/exponentialinv.c, cdf/exppow.c, cdf/fdist.c, cdf/fdistinv.c, cdf/flat.c, cdf/flatinv.c, cdf/gamma.c, cdf/gammainv.c, cdf/gauss.c, cdf/gaussinv.c, cdf/geometric.c, cdf/gsl_cdf.h, cdf/gumbel1.c, cdf/gumbel1inv.c, cdf/gumbel2.c, cdf/gumbel2inv.c, cdf/hypergeometric.c, cdf/laplace.c, cdf/laplaceinv.c, cdf/logistic.c, cdf/logisticinv.c, cdf/lognormal.c, cdf/lognormalinv.c, cdf/nbinomial.c, cdf/pareto.c, cdf/paretoinv.c, cdf/pascal.c, cdf/poisson.c, cdf/rat_eval.h, cdf/rayleigh.c, cdf/rayleighinv.c, cdf/tdist.c, cdf/tdistinv.c, cdf/test.c, cdf/test_auto.c, cdf/weibull.c, cdf/weibullinv.c, cheb/ChangeLog, cheb/Makefile.am, cheb/Makefile.in, cheb/deriv.c, cheb/eval.c, cheb/gsl_chebyshev.h, cheb/init.c, cheb/integ.c, cheb/test.c, combination/ChangeLog, combination/Makefile.am, combination/Makefile.in, combination/combination.c, combination/file.c, combination/gsl_combination.h, combination/init.c, combination/test.c, complex/ChangeLog, complex/Makefile.am, complex/Makefile.in, complex/TODO, complex/gsl_complex.h, complex/gsl_complex_math.h, complex/math.c, complex/results.h, complex/results1.h, complex/results_real.h, complex/test.c, const/ChangeLog, const/Makefile.am, const/Makefile.in, const/TODO, const/gsl_const.h, const/gsl_const_cgs.h, const/gsl_const_cgsm.h, const/gsl_const_mks.h, const/gsl_const_mksa.h, const/gsl_const_num.h, const/test.c, deriv/ChangeLog, deriv/Makefile.am, deriv/Makefile.in, deriv/deriv.c, deriv/gsl_deriv.h, deriv/test.c, dht/ChangeLog, dht/Makefile.am, dht/Makefile.in, dht/dht.c, dht/gsl_dht.h, dht/test.c, diff/ChangeLog, diff/Makefile.am, diff/Makefile.in, diff/diff.c, diff/gsl_diff.h, diff/test.c, doc/12-cities.eps, doc/ChangeLog, doc/Makefile.am, doc/Makefile.in, doc/algorithm.sty, doc/algorithmic.sty, doc/autoconf.texi, doc/blas.texi, doc/bspline.eps, doc/bspline.texi, doc/calc.sty, doc/cblas.texi, doc/cheb.eps, doc/cheb.texi, doc/combination.texi, doc/complex.texi, doc/const.texi, doc/debug.texi, doc/dht.texi, doc/diff.texi, doc/dwt-orig.eps, doc/dwt-samp.eps, doc/dwt.texi, doc/eigen.texi, doc/err.texi, doc/fdl.texi, doc/fft-complex-radix2-f.eps, doc/fft-complex-radix2-t.eps, doc/fft-complex-radix2.eps, doc/fft-real-mixedradix.eps, doc/fft.texi, doc/fftalgorithms.bib, doc/fftalgorithms.tex, doc/final-route.eps, doc/fit-exp.eps, doc/fit-wlinear.eps, doc/fit-wlinear2.eps, doc/fitting.texi, doc/freemanuals.texi, doc/gpl.texi, doc/gsl-config.1, doc/gsl-design.texi, doc/gsl-histogram.1, doc/gsl-randist.1, doc/gsl-ref.info, doc/gsl-ref.info-1, doc/gsl-ref.info-2, doc/gsl-ref.info-3, doc/gsl-ref.info-4, doc/gsl-ref.info-5, doc/gsl-ref.info-6, doc/gsl-ref.texi, doc/gsl.3, doc/histogram.eps, doc/histogram.texi, doc/histogram2d.eps, doc/ieee754.texi, doc/initial-route.eps, doc/integration.texi, doc/interp.texi, doc/interp2.eps, doc/interpp2.eps, doc/intro.texi, doc/landau.dat, doc/linalg.texi, doc/math.texi, doc/mdate-sh, doc/min-interval.eps, doc/min.texi, doc/montecarlo.texi, doc/multifit.texi, doc/multimin.eps, doc/multimin.texi, doc/multiroots.texi, doc/ntuple.eps, doc/ntuple.texi, doc/ode-initval.texi, doc/permutation.texi, doc/poly.texi, doc/qrng.eps, doc/qrng.texi, doc/rand-bernoulli.tex, doc/rand-beta.tex, doc/rand-binomial.tex, doc/rand-bivariate-gaussian.tex, doc/rand-cauchy.tex, doc/rand-chisq.tex, doc/rand-erlang.tex, doc/rand-exponential.tex, doc/rand-exppow.tex, doc/rand-fdist.tex, doc/rand-flat.tex, doc/rand-gamma.tex, doc/rand-gaussian-tail.tex, doc/rand-gaussian.tex, doc/rand-geometric.tex, doc/rand-gumbel.tex, doc/rand-gumbel1.tex, doc/rand-gumbel2.tex, doc/rand-hypergeometric.tex, doc/rand-landau.tex, doc/rand-laplace.tex, doc/rand-levy.tex, doc/rand-levyskew.tex, doc/rand-logarithmic.tex, doc/rand-logistic.tex, doc/rand-lognormal.tex, doc/rand-nbinomial.tex, doc/rand-pareto.tex, doc/rand-pascal.tex, doc/rand-poisson.tex, doc/rand-rayleigh-tail.tex, doc/rand-rayleigh.tex, doc/rand-tdist.tex, doc/rand-weibull.tex, doc/randist.texi, doc/random-walk.tex, doc/randplots.gnp, doc/rng.texi, doc/roots-bisection.eps, doc/roots-false-position.eps, doc/roots-newtons-method.eps, doc/roots-secant-method.eps, doc/roots.texi, doc/siman-energy.eps, doc/siman-test.eps, doc/siman.texi, doc/sort.texi, doc/specfunc-airy.texi, doc/specfunc-bessel.texi, doc/specfunc-clausen.texi, doc/specfunc-coulomb.texi, doc/specfunc-coupling.texi, doc/specfunc-dawson.texi, doc/specfunc-debye.texi, doc/specfunc-dilog.texi, doc/specfunc-elementary.texi, doc/specfunc-ellint.texi, doc/specfunc-elljac.texi, doc/specfunc-erf.texi, doc/specfunc-exp.texi, doc/specfunc-expint.texi, doc/specfunc-fermi-dirac.texi, doc/specfunc-gamma.texi, doc/specfunc-gegenbauer.texi, doc/specfunc-hyperg.texi, doc/specfunc-laguerre.texi, doc/specfunc-lambert.texi, doc/specfunc-legendre.texi, doc/specfunc-log.texi, doc/specfunc-mathieu.texi, doc/specfunc-pow-int.texi, doc/specfunc-psi.texi, doc/specfunc-synchrotron.texi, doc/specfunc-transport.texi, doc/specfunc-trig.texi, doc/specfunc-zeta.texi, doc/specfunc.texi, doc/stamp-vti, doc/statistics.texi, doc/sum.texi, doc/texinfo.tex, doc/usage.texi, doc/vdp.eps, doc/vectors.texi, doc/version-ref.texi, doc/examples/blas.c, doc/examples/blas.out, doc/examples/block.c, doc/examples/block.out, doc/examples/bspline.c, doc/examples/cblas.c, doc/examples/cblas.out, doc/examples/cdf.c, doc/examples/cdf.out, doc/examples/cheb.c, doc/examples/combination.c, doc/examples/combination.out, doc/examples/const.c, doc/examples/const.out, doc/examples/demo_fn.c, doc/examples/demo_fn.h, doc/examples/diff.c, doc/examples/diff.out, doc/examples/dwt.c, doc/examples/dwt.dat, doc/examples/ecg.dat, doc/examples/eigen.c, doc/examples/eigen_nonsymm.c, doc/examples/expfit.c, doc/examples/fft.c, doc/examples/fftmr.c, doc/examples/fftreal.c, doc/examples/fitting.c, doc/examples/fitting2.c, doc/examples/fitting3.c, doc/examples/histogram.c, doc/examples/histogram2d.c, doc/examples/ieee.c, doc/examples/ieeeround.c, doc/examples/integration.c, doc/examples/integration.out, doc/examples/interp.c, doc/examples/interpp.c, doc/examples/intro.c, doc/examples/intro.out, doc/examples/linalglu.c, doc/examples/linalglu.out, doc/examples/matrix.c, doc/examples/matrixw.c, doc/examples/min.c, doc/examples/min.out, doc/examples/monte.c, doc/examples/nlfit.c, doc/examples/ntupler.c, doc/examples/ntuplew.c, doc/examples/ode-initval.c, doc/examples/odefixed.c, doc/examples/permseq.c, doc/examples/permshuffle.c, doc/examples/polyroots.c, doc/examples/polyroots.out, doc/examples/qrng.c, doc/examples/randpoisson.2.out, doc/examples/randpoisson.c, doc/examples/randpoisson.out, doc/examples/randwalk.c, doc/examples/rng.c, doc/examples/rng.out, doc/examples/rngunif.2.out, doc/examples/rngunif.c, doc/examples/rngunif.out, doc/examples/rootnewt.c, doc/examples/roots.c, doc/examples/siman.c, doc/examples/sortsmall.c, doc/examples/sortsmall.out, doc/examples/specfun.c, doc/examples/specfun.out, doc/examples/specfun_e.c, doc/examples/specfun_e.out, doc/examples/stat.c, doc/examples/stat.out, doc/examples/statsort.c, doc/examples/statsort.out, doc/examples/sum.c, doc/examples/sum.out, doc/examples/vector.c, doc/examples/vectorr.c, doc/examples/vectorview.c, doc/examples/vectorview.out, doc/examples/vectorw.c, eigen/ChangeLog, eigen/Makefile.am, eigen/Makefile.in, eigen/TODO, eigen/francis.c, eigen/gsl_eigen.h, eigen/herm.c, eigen/hermv.c, eigen/jacobi.c, eigen/nonsymm.c, eigen/nonsymmv.c, eigen/qrstep.c, eigen/schur.c, eigen/schur.h, eigen/sort.c, eigen/symm.c, eigen/symmv.c, eigen/test.c, err/ChangeLog, err/Makefile.am, err/Makefile.in, err/TODO, err/error.c, err/gsl_errno.h, err/gsl_message.h, err/message.c, err/stream.c, err/strerror.c, err/test.c, fft/ChangeLog, fft/Makefile.am, fft/Makefile.in, fft/TODO, fft/bitreverse.c, fft/bitreverse.h, fft/c_init.c, fft/c_main.c, fft/c_pass.h, fft/c_pass_2.c, fft/c_pass_3.c, fft/c_pass_4.c, fft/c_pass_5.c, fft/c_pass_6.c, fft/c_pass_7.c, fft/c_pass_n.c, fft/c_radix2.c, fft/compare.h, fft/compare_source.c, fft/complex_internal.h, fft/dft.c, fft/dft_source.c, fft/factorize.c, fft/factorize.h, fft/fft.c, fft/gsl_dft_complex.h, fft/gsl_dft_complex_float.h, fft/gsl_fft.h, fft/gsl_fft_complex.h, fft/gsl_fft_complex_float.h, fft/gsl_fft_halfcomplex.h, fft/gsl_fft_halfcomplex_float.h, fft/gsl_fft_real.h, fft/gsl_fft_real_float.h, fft/hc_init.c, fft/hc_main.c, fft/hc_pass.h, fft/hc_pass_2.c, fft/hc_pass_3.c, fft/hc_pass_4.c, fft/hc_pass_5.c, fft/hc_pass_n.c, fft/hc_radix2.c, fft/hc_unpack.c, fft/real_init.c, fft/real_main.c, fft/real_pass.h, fft/real_pass_2.c, fft/real_pass_3.c, fft/real_pass_4.c, fft/real_pass_5.c, fft/real_pass_n.c, fft/real_radix2.c, fft/real_unpack.c, fft/signals.c, fft/signals.h, fft/signals_source.c, fft/test.c, fft/test_complex_source.c, fft/test_real_source.c, fft/test_trap_source.c, fft/urand.c, fit/ChangeLog, fit/Makefile.am, fit/Makefile.in, fit/gsl_fit.h, fit/linear.c, fit/test.c, gsl/Makefile.am, gsl/Makefile.in, histogram/ChangeLog, histogram/Makefile.am, histogram/Makefile.in, histogram/TODO, histogram/add.c, histogram/add2d.c, histogram/calloc_range.c, histogram/calloc_range2d.c, histogram/copy.c, histogram/copy2d.c, histogram/file.c, histogram/file2d.c, histogram/find.c, histogram/find2d.c, histogram/get.c, histogram/get2d.c, histogram/gsl_histogram.h, histogram/gsl_histogram2d.h, histogram/init.c, histogram/init2d.c, histogram/maxval.c, histogram/maxval2d.c, histogram/oper.c, histogram/oper2d.c, histogram/params.c, histogram/params2d.c, histogram/pdf.c, histogram/pdf2d.c, histogram/reset.c, histogram/reset2d.c, histogram/stat.c, histogram/stat2d.c, histogram/test.c, histogram/test1d.c, histogram/test1d_resample.c, histogram/test1d_trap.c, histogram/test2d.c, histogram/test2d_resample.c, histogram/test2d_trap.c, histogram/urand.c, ieee-utils/ChangeLog, ieee-utils/Makefile.am, ieee-utils/Makefile.in, ieee-utils/TODO, ieee-utils/endian.c, ieee-utils/env.c, ieee-utils/fp-aix.c, ieee-utils/fp-darwin.c, ieee-utils/fp-darwin86.c, ieee-utils/fp-freebsd.c, ieee-utils/fp-gnuc99.c, ieee-utils/fp-gnum68k.c, ieee-utils/fp-gnuppc.c, ieee-utils/fp-gnusparc.c, ieee-utils/fp-gnux86.c, ieee-utils/fp-hpux.c, ieee-utils/fp-hpux11.c, ieee-utils/fp-irix.c, ieee-utils/fp-netbsd.c, ieee-utils/fp-openbsd.c, ieee-utils/fp-os2emx.c, ieee-utils/fp-solaris.c, ieee-utils/fp-sunos4.c, ieee-utils/fp-tru64.c, ieee-utils/fp-unknown.c, ieee-utils/fp.c, ieee-utils/gsl_ieee_utils.h, ieee-utils/make_rep.c, ieee-utils/print.c, ieee-utils/read.c, ieee-utils/standardize.c, ieee-utils/test.c, integration/ChangeLog, integration/Makefile.am, integration/Makefile.in, integration/TODO, integration/append.c, integration/err.c, integration/gsl_integration.h, integration/initialise.c, integration/positivity.c, integration/ptsort.c, integration/qag.c, integration/qagp.c, integration/qags.c, integration/qawc.c, integration/qawf.c, integration/qawo.c, integration/qaws.c, integration/qc25c.c, integration/qc25f.c, integration/qc25s.c, integration/qcheb.c, integration/qelg.c, integration/qk.c, integration/qk15.c, integration/qk21.c, integration/qk31.c, integration/qk41.c, integration/qk51.c, integration/qk61.c, integration/qmomo.c, integration/qmomof.c, integration/qng.c, integration/qng.h, integration/qpsrt.c, integration/qpsrt2.c, integration/reset.c, integration/set_initial.c, integration/test.c, integration/tests.c, integration/tests.h, integration/util.c, integration/workspace.c, interpolation/ChangeLog, interpolation/Makefile.am, interpolation/Makefile.in, interpolation/TODO, interpolation/accel.c, interpolation/akima.c, interpolation/bsearch.c, interpolation/bsearch.h, interpolation/cspline.c, interpolation/gsl_interp.h, interpolation/gsl_spline.h, interpolation/integ_eval.h, interpolation/interp.c, interpolation/linear.c, interpolation/poly.c, interpolation/spline.c, interpolation/test.c, linalg/ChangeLog, linalg/Makefile.am, linalg/Makefile.in, linalg/TODO, linalg/apply_givens.c, linalg/balance.c, linalg/balancemat.c, linalg/bidiag.c, linalg/cholesky.c, linalg/exponential.c, linalg/givens.c, linalg/gsl_linalg.h, linalg/hermtd.c, linalg/hessenberg.c, linalg/hh.c, linalg/householder.c, linalg/householdercomplex.c, linalg/lq.c, linalg/lu.c, linalg/luc.c, linalg/multiply.c, linalg/ptlq.c, linalg/qr.c, linalg/qrpt.c, linalg/svd.c, linalg/svdstep.c, linalg/symmtd.c, linalg/test.c, linalg/tridiag.c, linalg/tridiag.h, matrix/ChangeLog, matrix/Makefile.am, matrix/Makefile.in, matrix/TODO, matrix/copy.c, matrix/copy_source.c, matrix/file.c, matrix/file_source.c, matrix/getset.c, matrix/getset_source.c, matrix/gsl_matrix.h, matrix/gsl_matrix_char.h, matrix/gsl_matrix_complex_double.h, matrix/gsl_matrix_complex_float.h, matrix/gsl_matrix_complex_long_double.h, matrix/gsl_matrix_double.h, matrix/gsl_matrix_float.h, matrix/gsl_matrix_int.h, matrix/gsl_matrix_long.h, matrix/gsl_matrix_long_double.h, matrix/gsl_matrix_short.h, matrix/gsl_matrix_uchar.h, matrix/gsl_matrix_uint.h, matrix/gsl_matrix_ulong.h, matrix/gsl_matrix_ushort.h, matrix/init.c, matrix/init_source.c, matrix/matrix.c, matrix/matrix_source.c, matrix/minmax.c, matrix/minmax_source.c, matrix/oper.c, matrix/oper_complex_source.c, matrix/oper_source.c, matrix/prop.c, matrix/prop_source.c, matrix/rowcol.c, matrix/rowcol_source.c, matrix/submatrix.c, matrix/submatrix_source.c, matrix/swap.c, matrix/swap_source.c, matrix/test.c, matrix/test_complex_source.c, matrix/test_source.c, matrix/test_static.c, matrix/view.c, matrix/view.h, matrix/view_source.c, min/ChangeLog, min/Makefile.am, min/Makefile.in, min/bracketing.c, min/brent.c, min/convergence.c, min/fsolver.c, min/golden.c, min/gsl_min.h, min/min.h, min/test.c, min/test.h, min/test_funcs.c, monte/ChangeLog, monte/Makefile.am, monte/Makefile.in, monte/README, monte/TODO, monte/gsl_monte.h, monte/gsl_monte_miser.h, monte/gsl_monte_plain.h, monte/gsl_monte_vegas.h, monte/miser.c, monte/plain.c, monte/test.c, monte/test_main.c, monte/vegas.c, multifit/ChangeLog, multifit/Makefile.am, multifit/Makefile.in, multifit/TODO, multifit/convergence.c, multifit/covar.c, multifit/fdfsolver.c, multifit/fsolver.c, multifit/gradient.c, multifit/gsl_multifit.h, multifit/gsl_multifit_nlin.h, multifit/lmder.c, multifit/lmiterate.c, multifit/lmpar.c, multifit/lmset.c, multifit/lmutil.c, multifit/multilinear.c, multifit/qrsolv.c, multifit/test.c, multifit/test_brown.c, multifit/test_enso.c, multifit/test_estimator.c, multifit/test_filip.c, multifit/test_fn.c, multifit/test_hahn1.c, multifit/test_kirby2.c, multifit/test_longley.c, multifit/test_nelson.c, multifit/test_pontius.c, multifit/work.c, multimin/ChangeLog, multimin/Makefile.am, multimin/Makefile.in, multimin/TODO, multimin/conjugate_fr.c, multimin/conjugate_pr.c, multimin/convergence.c, multimin/diff.c, multimin/directional_minimize.c, multimin/fdfminimizer.c, multimin/fminimizer.c, multimin/gsl_multimin.h, multimin/linear_minimize.c, multimin/linear_wrapper.c, multimin/simplex.c, multimin/steepest_descent.c, multimin/test.c, multimin/test_funcs.c, multimin/test_funcs.h, multimin/vector_bfgs.c, multimin/vector_bfgs2.c, multiroots/ChangeLog, multiroots/Makefile.am, multiroots/Makefile.in, multiroots/broyden.c, multiroots/convergence.c, multiroots/dnewton.c, multiroots/dogleg.c, multiroots/enorm.c, multiroots/fdfsolver.c, multiroots/fdjac.c, multiroots/fsolver.c, multiroots/gnewton.c, multiroots/gsl_multiroots.h, multiroots/hybrid.c, multiroots/hybridj.c, multiroots/newton.c, multiroots/test.c, multiroots/test_funcs.c, multiroots/test_funcs.h, ntuple/ChangeLog, ntuple/Makefile.am, ntuple/Makefile.in, ntuple/gsl_ntuple.h, ntuple/ntuple.c, ntuple/test.c, ode-initval/ChangeLog, ode-initval/Makefile.am, ode-initval/Makefile.in, ode-initval/TODO, ode-initval/bsimp.c, ode-initval/control.c, ode-initval/cscal.c, ode-initval/cstd.c, ode-initval/evolve.c, ode-initval/gear1.c, ode-initval/gear2.c, ode-initval/gsl_odeiv.h, ode-initval/odeiv_util.h, ode-initval/rk2.c, ode-initval/rk2imp.c, ode-initval/rk2simp.c, ode-initval/rk4.c, ode-initval/rk4imp.c, ode-initval/rk8pd.c, ode-initval/rkck.c, ode-initval/rkf45.c, ode-initval/step.c, ode-initval/test.c, permutation/ChangeLog, permutation/Makefile.am, permutation/Makefile.in, permutation/canonical.c, permutation/file.c, permutation/gsl_permutation.h, permutation/gsl_permute.h, permutation/gsl_permute_char.h, permutation/gsl_permute_complex_double.h, permutation/gsl_permute_complex_float.h, permutation/gsl_permute_complex_long_double.h, permutation/gsl_permute_double.h, permutation/gsl_permute_float.h, permutation/gsl_permute_int.h, permutation/gsl_permute_long.h, permutation/gsl_permute_long_double.h, permutation/gsl_permute_short.h, permutation/gsl_permute_uchar.h, permutation/gsl_permute_uint.h, permutation/gsl_permute_ulong.h, permutation/gsl_permute_ushort.h, permutation/gsl_permute_vector.h, permutation/gsl_permute_vector_char.h, permutation/gsl_permute_vector_complex_double.h, permutation/gsl_permute_vector_complex_float.h, permutation/gsl_permute_vector_complex_long_double.h, permutation/gsl_permute_vector_double.h, permutation/gsl_permute_vector_float.h, permutation/gsl_permute_vector_int.h, permutation/gsl_permute_vector_long.h, permutation/gsl_permute_vector_long_double.h, permutation/gsl_permute_vector_short.h, permutation/gsl_permute_vector_uchar.h, permutation/gsl_permute_vector_uint.h, permutation/gsl_permute_vector_ulong.h, permutation/gsl_permute_vector_ushort.h, permutation/init.c, permutation/permutation.c, permutation/permute.c, permutation/permute_source.c, permutation/test.c, poly/ChangeLog, poly/Makefile.am, poly/Makefile.in, poly/TODO, poly/balance.c, poly/companion.c, poly/dd.c, poly/eval.c, poly/gsl_poly.h, poly/qr.c, poly/solve_cubic.c, poly/solve_quadratic.c, poly/test.c, poly/zsolve.c, poly/zsolve_cubic.c, poly/zsolve_init.c, poly/zsolve_quadratic.c, qrng/ChangeLog, qrng/Makefile.am, qrng/Makefile.in, qrng/TODO, qrng/gsl_qrng.h, qrng/niederreiter-2.c, qrng/qrng.c, qrng/sobol.c, qrng/test.c, randist/ChangeLog, randist/Makefile.am, randist/Makefile.in, randist/TODO, randist/bernoulli.c, randist/beta.c, randist/bigauss.c, randist/binomial.c, randist/binomial_tpe.c, randist/cauchy.c, randist/chisq.c, randist/dirichlet.c, randist/discrete.c, randist/erlang.c, randist/exponential.c, randist/exppow.c, randist/fdist.c, randist/flat.c, randist/gamma.c, randist/gauss.c, randist/gausstail.c, randist/gausszig.c, randist/geometric.c, randist/gsl_randist.h, randist/gumbel.c, randist/hyperg.c, randist/landau.c, randist/laplace.c, randist/levy.c, randist/logarithmic.c, randist/logistic.c, randist/lognormal.c, randist/multinomial.c, randist/nbinomial.c, randist/pareto.c, randist/pascal.c, randist/poisson.c, randist/rayleigh.c, randist/shuffle.c, randist/sphere.c, randist/tdist.c, randist/test.c, randist/weibull.c, rng/ChangeLog, rng/Makefile.am, rng/Makefile.in, rng/TODO, rng/borosh13.c, rng/cmrg.c, rng/coveyou.c, rng/default.c, rng/file.c, rng/fishman18.c, rng/fishman20.c, rng/fishman2x.c, rng/gfsr4.c, rng/gsl_rng.h, rng/knuthran.c, rng/knuthran2.c, rng/knuthran2002.c, rng/lecuyer21.c, rng/minstd.c, rng/mrg.c, rng/mt.c, rng/r250.c, rng/ran0.c, rng/ran1.c, rng/ran2.c, rng/ran3.c, rng/rand.c, rng/rand48.c, rng/random.c, rng/randu.c, rng/ranf.c, rng/ranlux.c, rng/ranlxd.c, rng/ranlxs.c, rng/ranmar.c, rng/rng.c, rng/schrage.c, rng/slatec.c, rng/taus.c, rng/taus113.c, rng/test.c, rng/transputer.c, rng/tt.c, rng/types.c, rng/uni.c, rng/uni32.c, rng/vax.c, rng/waterman14.c, rng/zuf.c, roots/ChangeLog, roots/Makefile.am, roots/Makefile.in, roots/TODO, roots/bisection.c, roots/brent.c, roots/convergence.c, roots/falsepos.c, roots/fdfsolver.c, roots/fsolver.c, roots/gsl_roots.h, roots/newton.c, roots/roots.h, roots/secant.c, roots/steffenson.c, roots/test.c, roots/test.h, roots/test_funcs.c, siman/ChangeLog, siman/Makefile.am, siman/Makefile.in, siman/TODO, siman/gsl_siman.h, siman/siman.c, siman/siman_test_driver.sh, siman/siman_tsp.c, siman/test.c, sort/ChangeLog, sort/Makefile.am, sort/Makefile.in, sort/TODO, sort/gsl_heapsort.h, sort/gsl_sort.h, sort/gsl_sort_char.h, sort/gsl_sort_double.h, sort/gsl_sort_float.h, sort/gsl_sort_int.h, sort/gsl_sort_long.h, sort/gsl_sort_long_double.h, sort/gsl_sort_short.h, sort/gsl_sort_uchar.h, sort/gsl_sort_uint.h, sort/gsl_sort_ulong.h, sort/gsl_sort_ushort.h, sort/gsl_sort_vector.h, sort/gsl_sort_vector_char.h, sort/gsl_sort_vector_double.h, sort/gsl_sort_vector_float.h, sort/gsl_sort_vector_int.h, sort/gsl_sort_vector_long.h, sort/gsl_sort_vector_long_double.h, sort/gsl_sort_vector_short.h, sort/gsl_sort_vector_uchar.h, sort/gsl_sort_vector_uint.h, sort/gsl_sort_vector_ulong.h, sort/gsl_sort_vector_ushort.h, sort/sort.c, sort/sortind.c, sort/sortvec.c, sort/sortvec_source.c, sort/sortvecind.c, sort/sortvecind_source.c, sort/subset.c, sort/subset_source.c, sort/subsetind.c, sort/subsetind_source.c, sort/test.c, sort/test_heapsort.c, sort/test_source.c, specfunc/ChangeLog, specfunc/Makefile.am, specfunc/Makefile.in, specfunc/TODO, specfunc/airy.c, specfunc/airy_der.c, specfunc/airy_zero.c, specfunc/atanint.c, specfunc/bessel.c, specfunc/bessel.h, specfunc/bessel_I0.c, specfunc/bessel_I1.c, specfunc/bessel_In.c, specfunc/bessel_Inu.c, specfunc/bessel_J0.c, specfunc/bessel_J1.c, specfunc/bessel_Jn.c, specfunc/bessel_Jnu.c, specfunc/bessel_K0.c, specfunc/bessel_K1.c, specfunc/bessel_Kn.c, specfunc/bessel_Knu.c, specfunc/bessel_Y0.c, specfunc/bessel_Y1.c, specfunc/bessel_Yn.c, specfunc/bessel_Ynu.c, specfunc/bessel_amp_phase.c, specfunc/bessel_amp_phase.h, specfunc/bessel_i.c, specfunc/bessel_j.c, specfunc/bessel_k.c, specfunc/bessel_olver.c, specfunc/bessel_olver.h, specfunc/bessel_sequence.c, specfunc/bessel_temme.c, specfunc/bessel_temme.h, specfunc/bessel_y.c, specfunc/bessel_zero.c, specfunc/beta.c, specfunc/beta_inc.c, specfunc/cheb_eval.c, specfunc/cheb_eval_mode.c, specfunc/chebyshev.h, specfunc/check.h, specfunc/clausen.c, specfunc/coulomb.c, specfunc/coulomb_bound.c, specfunc/coupling.c, specfunc/dawson.c, specfunc/debye.c, specfunc/dilog.c, specfunc/elementary.c, specfunc/ellint.c, specfunc/elljac.c, specfunc/erfc.c, specfunc/error.h, specfunc/eval.h, specfunc/exp.c, specfunc/expint.c, specfunc/expint3.c, specfunc/fermi_dirac.c, specfunc/gamma.c, specfunc/gamma_inc.c, specfunc/gegenbauer.c, specfunc/gsl_sf.h, specfunc/gsl_sf_airy.h, specfunc/gsl_sf_bessel.h, specfunc/gsl_sf_clausen.h, specfunc/gsl_sf_coulomb.h, specfunc/gsl_sf_coupling.h, specfunc/gsl_sf_dawson.h, specfunc/gsl_sf_debye.h, specfunc/gsl_sf_dilog.h, specfunc/gsl_sf_elementary.h, specfunc/gsl_sf_ellint.h, specfunc/gsl_sf_elljac.h, specfunc/gsl_sf_erf.h, specfunc/gsl_sf_exp.h, specfunc/gsl_sf_expint.h, specfunc/gsl_sf_fermi_dirac.h, specfunc/gsl_sf_gamma.h, specfunc/gsl_sf_gegenbauer.h, specfunc/gsl_sf_hyperg.h, specfunc/gsl_sf_laguerre.h, specfunc/gsl_sf_lambert.h, specfunc/gsl_sf_legendre.h, specfunc/gsl_sf_log.h, specfunc/gsl_sf_mathieu.h, specfunc/gsl_sf_pow_int.h, specfunc/gsl_sf_psi.h, specfunc/gsl_sf_result.h, specfunc/gsl_sf_synchrotron.h, specfunc/gsl_sf_transport.h, specfunc/gsl_sf_trig.h, specfunc/gsl_sf_zeta.h, specfunc/gsl_specfunc.h, specfunc/hyperg.c, specfunc/hyperg.h, specfunc/hyperg_0F1.c, specfunc/hyperg_1F1.c, specfunc/hyperg_2F0.c, specfunc/hyperg_2F1.c, specfunc/hyperg_U.c, specfunc/laguerre.c, specfunc/lambert.c, specfunc/legendre.h, specfunc/legendre_H3d.c, specfunc/legendre_Qn.c, specfunc/legendre_con.c, specfunc/legendre_poly.c, specfunc/log.c, specfunc/mathieu_angfunc.c, specfunc/mathieu_charv.c, specfunc/mathieu_coeff.c, specfunc/mathieu_radfunc.c, specfunc/mathieu_workspace.c, specfunc/poch.c, specfunc/pow_int.c, specfunc/psi.c, specfunc/recurse.h, specfunc/result.c, specfunc/shint.c, specfunc/sinint.c, specfunc/synchrotron.c, specfunc/test_airy.c, specfunc/test_bessel.c, specfunc/test_coulomb.c, specfunc/test_dilog.c, specfunc/test_gamma.c, specfunc/test_hyperg.c, specfunc/test_legendre.c, specfunc/test_mathieu.c, specfunc/test_sf.c, specfunc/test_sf.h, specfunc/transport.c, specfunc/trig.c, specfunc/zeta.c, statistics/ChangeLog, statistics/Makefile.am, statistics/Makefile.in, statistics/TODO, statistics/absdev.c, statistics/absdev_source.c, statistics/covariance.c, statistics/covariance_source.c, statistics/gsl_statistics.h, statistics/gsl_statistics_char.h, statistics/gsl_statistics_double.h, statistics/gsl_statistics_float.h, statistics/gsl_statistics_int.h, statistics/gsl_statistics_long.h, statistics/gsl_statistics_long_double.h, statistics/gsl_statistics_short.h, statistics/gsl_statistics_uchar.h, statistics/gsl_statistics_uint.h, statistics/gsl_statistics_ulong.h, statistics/gsl_statistics_ushort.h, statistics/kurtosis.c, statistics/kurtosis_source.c, statistics/lag1.c, statistics/lag1_source.c, statistics/mean.c, statistics/mean_source.c, statistics/median.c, statistics/median_source.c, statistics/minmax.c, statistics/minmax_source.c, statistics/p_variance.c, statistics/p_variance_source.c, statistics/quantiles.c, statistics/quantiles_source.c, statistics/skew.c, statistics/skew_source.c, statistics/test.c, statistics/test_float_source.c, statistics/test_int_source.c, statistics/test_nist.c, statistics/ttest.c, statistics/ttest_source.c, statistics/variance.c, statistics/variance_source.c, statistics/wabsdev.c, statistics/wabsdev_source.c, statistics/wkurtosis.c, statistics/wkurtosis_source.c, statistics/wmean.c, statistics/wmean_source.c, statistics/wskew.c, statistics/wskew_source.c, statistics/wvariance.c, statistics/wvariance_source.c, sum/ChangeLog, sum/Makefile.am, sum/Makefile.in, sum/gsl_sum.h, sum/levin_u.c, sum/levin_utrunc.c, sum/test.c, sum/work_u.c, sum/work_utrunc.c, sys/ChangeLog, sys/Makefile.am, sys/Makefile.in, sys/coerce.c, sys/expm1.c, sys/fcmp.c, sys/fdiv.c, sys/gsl_sys.h, sys/hypot.c, sys/infnan.c, sys/invhyp.c, sys/ldfrexp.c, sys/log1p.c, sys/minmax.c, sys/pow_int.c, sys/prec.c, sys/test.c, test/ChangeLog, test/Makefile.am, test/Makefile.in, test/gsl_test.h, test/results.c, utils/Makefile.am, utils/Makefile.in, utils/README, utils/memcpy.c, utils/memmove.c, utils/placeholder.c, utils/strdup.c, utils/strtol.c, utils/strtoul.c, utils/system.h, vector/ChangeLog, vector/Makefile.am, vector/Makefile.in, vector/TODO, vector/copy.c, vector/copy_source.c, vector/file.c, vector/file_source.c, vector/gsl_vector.h, vector/gsl_vector_char.h, vector/gsl_vector_complex.h, vector/gsl_vector_complex_double.h, vector/gsl_vector_complex_float.h, vector/gsl_vector_complex_long_double.h, vector/gsl_vector_double.h, vector/gsl_vector_float.h, vector/gsl_vector_int.h, vector/gsl_vector_long.h, vector/gsl_vector_long_double.h, vector/gsl_vector_short.h, vector/gsl_vector_uchar.h, vector/gsl_vector_uint.h, vector/gsl_vector_ulong.h, vector/gsl_vector_ushort.h, vector/init.c, vector/init_source.c, vector/minmax.c, vector/minmax_source.c, vector/oper.c, vector/oper_source.c, vector/prop.c, vector/prop_source.c, vector/reim.c, vector/reim_source.c, vector/subvector.c, vector/subvector_source.c, vector/swap.c, vector/swap_source.c, vector/test.c, vector/test_complex_source.c, vector/test_source.c, vector/test_static.c, vector/vector.c, vector/vector_source.c, vector/view.c, vector/view.h, vector/view_source.c, wavelet/ChangeLog, wavelet/Makefile.am, wavelet/Makefile.in, wavelet/TODO, wavelet/bspline.c, wavelet/daubechies.c, wavelet/dwt.c, wavelet/gsl_wavelet.h, wavelet/gsl_wavelet2d.h, wavelet/haar.c, wavelet/test.c, wavelet/wavelet.c: New files.
Diffstat (limited to 'gsl-1.9/doc/randist.texi')
-rw-r--r--gsl-1.9/doc/randist.texi2296
1 files changed, 2296 insertions, 0 deletions
diff --git a/gsl-1.9/doc/randist.texi b/gsl-1.9/doc/randist.texi
new file mode 100644
index 0000000..e193a09
--- /dev/null
+++ b/gsl-1.9/doc/randist.texi
@@ -0,0 +1,2296 @@
+@cindex random number distributions
+@cindex cumulative distribution functions (CDFs)
+@cindex CDFs, cumulative distribution functions
+@cindex inverse cumulative distribution functions
+@cindex quantile functions
+This chapter describes functions for generating random variates and
+computing their probability distributions. Samples from the
+distributions described in this chapter can be obtained using any of the
+random number generators in the library as an underlying source of
+randomness.
+
+In the simplest cases a non-uniform distribution can be obtained
+analytically from the uniform distribution of a random number generator
+by applying an appropriate transformation. This method uses one call to
+the random number generator. More complicated distributions are created
+by the @dfn{acceptance-rejection} method, which compares the desired
+distribution against a distribution which is similar and known
+analytically. This usually requires several samples from the generator.
+
+The library also provides cumulative distribution functions and inverse
+cumulative distribution functions, sometimes referred to as quantile
+functions. The cumulative distribution functions and their inverses are
+computed separately for the upper and lower tails of the distribution,
+allowing full accuracy to be retained for small results.
+
+The functions for random variates and probability density functions
+described in this section are declared in @file{gsl_randist.h}. The
+corresponding cumulative distribution functions are declared in
+@file{gsl_cdf.h}.
+
+Note that the discrete random variate functions always
+return a value of type @code{unsigned int}, and on most platforms this
+has a maximum value of @c{$2^{32}-1 \approx 4.29\times10^9$}
+@math{2^32-1 ~=~ 4.29e9}. They should only be called with
+a safe range of parameters (where there is a negligible probability of
+a variate exceeding this limit) to prevent incorrect results due to
+overflow.
+
+@menu
+* Random Number Distribution Introduction::
+* The Gaussian Distribution::
+* The Gaussian Tail Distribution::
+* The Bivariate Gaussian Distribution::
+* The Exponential Distribution::
+* The Laplace Distribution::
+* The Exponential Power Distribution::
+* The Cauchy Distribution::
+* The Rayleigh Distribution::
+* The Rayleigh Tail Distribution::
+* The Landau Distribution::
+* The Levy alpha-Stable Distributions::
+* The Levy skew alpha-Stable Distribution::
+* The Gamma Distribution::
+* The Flat (Uniform) Distribution::
+* The Lognormal Distribution::
+* The Chi-squared Distribution::
+* The F-distribution::
+* The t-distribution::
+* The Beta Distribution::
+* The Logistic Distribution::
+* The Pareto Distribution::
+* Spherical Vector Distributions::
+* The Weibull Distribution::
+* The Type-1 Gumbel Distribution::
+* The Type-2 Gumbel Distribution::
+* The Dirichlet Distribution::
+* General Discrete Distributions::
+* The Poisson Distribution::
+* The Bernoulli Distribution::
+* The Binomial Distribution::
+* The Multinomial Distribution::
+* The Negative Binomial Distribution::
+* The Pascal Distribution::
+* The Geometric Distribution::
+* The Hypergeometric Distribution::
+* The Logarithmic Distribution::
+* Shuffling and Sampling::
+* Random Number Distribution Examples::
+* Random Number Distribution References and Further Reading::
+@end menu
+
+@node Random Number Distribution Introduction
+@section Introduction
+
+Continuous random number distributions are defined by a probability
+density function, @math{p(x)}, such that the probability of @math{x}
+occurring in the infinitesimal range @math{x} to @math{x+dx} is @c{$p\,dx$}
+@math{p dx}.
+
+The cumulative distribution function for the lower tail @math{P(x)} is
+defined by the integral,
+@tex
+\beforedisplay
+$$
+P(x) = \int_{-\infty}^{x} dx' p(x')
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+P(x) = \int_@{-\infty@}^@{x@} dx' p(x')
+@end example
+
+@end ifinfo
+@noindent
+and gives the probability of a variate taking a value less than @math{x}.
+
+The cumulative distribution function for the upper tail @math{Q(x)} is
+defined by the integral,
+@tex
+\beforedisplay
+$$
+Q(x) = \int_{x}^{+\infty} dx' p(x')
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+Q(x) = \int_@{x@}^@{+\infty@} dx' p(x')
+@end example
+
+@end ifinfo
+@noindent
+and gives the probability of a variate taking a value greater than @math{x}.
+
+The upper and lower cumulative distribution functions are related by
+@math{P(x) + Q(x) = 1} and satisfy @c{$0 \le P(x) \le 1$}
+@math{0 <= P(x) <= 1}, @c{$0 \le Q(x) \le 1$}
+@math{0 <= Q(x) <= 1}.
+
+The inverse cumulative distributions, @c{$x=P^{-1}(P)$}
+@math{x=P^@{-1@}(P)} and @c{$x=Q^{-1}(Q)$}
+@math{x=Q^@{-1@}(Q)} give the values of @math{x}
+which correspond to a specific value of @math{P} or @math{Q}.
+They can be used to find confidence limits from probability values.
+
+For discrete distributions the probability of sampling the integer
+value @math{k} is given by @math{p(k)}, where @math{\sum_k p(k) = 1}.
+The cumulative distribution for the lower tail @math{P(k)} of a
+discrete distribution is defined as,
+@tex
+\beforedisplay
+$$
+P(k) = \sum_{i \le k} p(i)
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+P(k) = \sum_@{i <= k@} p(i)
+@end example
+
+@end ifinfo
+@noindent
+where the sum is over the allowed range of the distribution less than
+or equal to @math{k}.
+
+The cumulative distribution for the upper tail of a discrete
+distribution @math{Q(k)} is defined as
+@tex
+\beforedisplay
+$$
+Q(k) = \sum_{i > k} p(i)
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+Q(k) = \sum_@{i > k@} p(i)
+@end example
+
+@end ifinfo
+@noindent
+giving the sum of probabilities for all values greater than @math{k}.
+These two definitions satisfy the identity @math{P(k)+Q(k)=1}.
+
+If the range of the distribution is 1 to @math{n} inclusive then
+@math{P(n)=1}, @math{Q(n)=0} while @math{P(1) = p(1)},
+@math{Q(1)=1-p(1)}.
+
+@page
+@node The Gaussian Distribution
+@section The Gaussian Distribution
+@deftypefun double gsl_ran_gaussian (const gsl_rng * @var{r}, double @var{sigma})
+@cindex Gaussian distribution
+This function returns a Gaussian random variate, with mean zero and
+standard deviation @var{sigma}. The probability distribution for
+Gaussian random variates is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {1 \over \sqrt{2 \pi \sigma^2}} \exp (-x^2 / 2\sigma^2) dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{1 \over \sqrt@{2 \pi \sigma^2@}@} \exp (-x^2 / 2\sigma^2) dx
+@end example
+
+@end ifinfo
+@noindent
+for @math{x} in the range @math{-\infty} to @math{+\infty}. Use the
+transformation @math{z = \mu + x} on the numbers returned by
+@code{gsl_ran_gaussian} to obtain a Gaussian distribution with mean
+@math{\mu}. This function uses the Box-Mueller algorithm which requires two
+calls to the random number generator @var{r}.
+@end deftypefun
+
+@deftypefun double gsl_ran_gaussian_pdf (double @var{x}, double @var{sigma})
+This function computes the probability density @math{p(x)} at @var{x}
+for a Gaussian distribution with standard deviation @var{sigma}, using
+the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-gaussian.tex}
+@end tex
+
+@deftypefun double gsl_ran_gaussian_ziggurat (const gsl_rng * @var{r}, double @var{sigma})
+@deftypefunx double gsl_ran_gaussian_ratio_method (const gsl_rng * @var{r}, double @var{sigma})
+This function computes a Gaussian random variate using the alternative
+Marsaglia-Tsang ziggurat and Kinderman-Monahan-Leva ratio methods. The
+Ziggurat algorithm is the fastest available algorithm in most cases.
+@end deftypefun
+
+@deftypefun double gsl_ran_ugaussian (const gsl_rng * @var{r})
+@deftypefunx double gsl_ran_ugaussian_pdf (double @var{x})
+@deftypefunx double gsl_ran_ugaussian_ratio_method (const gsl_rng * @var{r})
+These functions compute results for the unit Gaussian distribution. They
+are equivalent to the functions above with a standard deviation of one,
+@var{sigma} = 1.
+@end deftypefun
+
+@deftypefun double gsl_cdf_gaussian_P (double @var{x}, double @var{sigma})
+@deftypefunx double gsl_cdf_gaussian_Q (double @var{x}, double @var{sigma})
+@deftypefunx double gsl_cdf_gaussian_Pinv (double @var{P}, double @var{sigma})
+@deftypefunx double gsl_cdf_gaussian_Qinv (double @var{Q}, double @var{sigma})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the Gaussian
+distribution with standard deviation @var{sigma}.
+@end deftypefun
+
+@deftypefun double gsl_cdf_ugaussian_P (double @var{x})
+@deftypefunx double gsl_cdf_ugaussian_Q (double @var{x})
+@deftypefunx double gsl_cdf_ugaussian_Pinv (double @var{P})
+@deftypefunx double gsl_cdf_ugaussian_Qinv (double @var{Q})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the unit Gaussian
+distribution.
+@end deftypefun
+
+@page
+@node The Gaussian Tail Distribution
+@section The Gaussian Tail Distribution
+@deftypefun double gsl_ran_gaussian_tail (const gsl_rng * @var{r}, double @var{a}, double @var{sigma})
+@cindex Gaussian Tail distribution
+This function provides random variates from the upper tail of a Gaussian
+distribution with standard deviation @var{sigma}. The values returned
+are larger than the lower limit @var{a}, which must be positive. The
+method is based on Marsaglia's famous rectangle-wedge-tail algorithm (Ann.
+Math. Stat. 32, 894--899 (1961)), with this aspect explained in Knuth, v2,
+3rd ed, p139,586 (exercise 11).
+
+The probability distribution for Gaussian tail random variates is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {1 \over N(a;\sigma) \sqrt{2 \pi \sigma^2}} \exp (- x^2 / 2\sigma^2) dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{1 \over N(a;\sigma) \sqrt@{2 \pi \sigma^2@}@} \exp (- x^2/(2 \sigma^2)) dx
+@end example
+
+@end ifinfo
+@noindent
+for @math{x > a} where @math{N(a;\sigma)} is the normalization constant,
+@tex
+\beforedisplay
+$$
+N(a;\sigma) = {1 \over 2} \hbox{erfc}\left({a \over \sqrt{2 \sigma^2}}\right).
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+N(a;\sigma) = (1/2) erfc(a / sqrt(2 sigma^2)).
+@end example
+@end ifinfo
+
+@end deftypefun
+
+@deftypefun double gsl_ran_gaussian_tail_pdf (double @var{x}, double @var{a}, double @var{sigma})
+This function computes the probability density @math{p(x)} at @var{x}
+for a Gaussian tail distribution with standard deviation @var{sigma} and
+lower limit @var{a}, using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-gaussian-tail.tex}
+@end tex
+
+@deftypefun double gsl_ran_ugaussian_tail (const gsl_rng * @var{r}, double @var{a})
+@deftypefunx double gsl_ran_ugaussian_tail_pdf (double @var{x}, double @var{a})
+These functions compute results for the tail of a unit Gaussian
+distribution. They are equivalent to the functions above with a standard
+deviation of one, @var{sigma} = 1.
+@end deftypefun
+
+
+@page
+@node The Bivariate Gaussian Distribution
+@section The Bivariate Gaussian Distribution
+
+@deftypefun void gsl_ran_bivariate_gaussian (const gsl_rng * @var{r}, double @var{sigma_x}, double @var{sigma_y}, double @var{rho}, double * @var{x}, double * @var{y})
+@cindex Bivariate Gaussian distribution
+@cindex two dimensional Gaussian distribution
+@cindex Gaussian distribution, bivariate
+This function generates a pair of correlated Gaussian variates, with
+mean zero, correlation coefficient @var{rho} and standard deviations
+@var{sigma_x} and @var{sigma_y} in the @math{x} and @math{y} directions.
+The probability distribution for bivariate Gaussian random variates is,
+@tex
+\beforedisplay
+$$
+p(x,y) dx dy = {1 \over 2 \pi \sigma_x \sigma_y \sqrt{1-\rho^2}} \exp \left(-{(x^2/\sigma_x^2 + y^2/\sigma_y^2 - 2 \rho x y/(\sigma_x\sigma_y)) \over 2(1-\rho^2)}\right) dx dy
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x,y) dx dy = @{1 \over 2 \pi \sigma_x \sigma_y \sqrt@{1-\rho^2@}@} \exp (-(x^2/\sigma_x^2 + y^2/\sigma_y^2 - 2 \rho x y/(\sigma_x\sigma_y))/2(1-\rho^2)) dx dy
+@end example
+
+@end ifinfo
+@noindent
+for @math{x,y} in the range @math{-\infty} to @math{+\infty}. The
+correlation coefficient @var{rho} should lie between @math{1} and
+@math{-1}.
+@end deftypefun
+
+@deftypefun double gsl_ran_bivariate_gaussian_pdf (double @var{x}, double @var{y}, double @var{sigma_x}, double @var{sigma_y}, double @var{rho})
+This function computes the probability density @math{p(x,y)} at
+(@var{x},@var{y}) for a bivariate Gaussian distribution with standard
+deviations @var{sigma_x}, @var{sigma_y} and correlation coefficient
+@var{rho}, using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-bivariate-gaussian.tex}
+@end tex
+
+@page
+@node The Exponential Distribution
+@section The Exponential Distribution
+@deftypefun double gsl_ran_exponential (const gsl_rng * @var{r}, double @var{mu})
+@cindex Exponential distribution
+This function returns a random variate from the exponential distribution
+with mean @var{mu}. The distribution is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {1 \over \mu} \exp(-x/\mu) dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{1 \over \mu@} \exp(-x/\mu) dx
+@end example
+
+@end ifinfo
+@noindent
+for @c{$x \ge 0$}
+@math{x >= 0}.
+@end deftypefun
+
+@deftypefun double gsl_ran_exponential_pdf (double @var{x}, double @var{mu})
+This function computes the probability density @math{p(x)} at @var{x}
+for an exponential distribution with mean @var{mu}, using the formula
+given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-exponential.tex}
+@end tex
+
+@deftypefun double gsl_cdf_exponential_P (double @var{x}, double @var{mu})
+@deftypefunx double gsl_cdf_exponential_Q (double @var{x}, double @var{mu})
+@deftypefunx double gsl_cdf_exponential_Pinv (double @var{P}, double @var{mu})
+@deftypefunx double gsl_cdf_exponential_Qinv (double @var{Q}, double @var{mu})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the exponential
+distribution with mean @var{mu}.
+@end deftypefun
+
+@page
+@node The Laplace Distribution
+@section The Laplace Distribution
+@deftypefun double gsl_ran_laplace (const gsl_rng * @var{r}, double @var{a})
+@cindex two-sided exponential distribution
+@cindex Laplace distribution
+This function returns a random variate from the Laplace distribution
+with width @var{a}. The distribution is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {1 \over 2 a} \exp(-|x/a|) dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{1 \over 2 a@} \exp(-|x/a|) dx
+@end example
+
+@end ifinfo
+@noindent
+for @math{-\infty < x < \infty}.
+@end deftypefun
+
+@deftypefun double gsl_ran_laplace_pdf (double @var{x}, double @var{a})
+This function computes the probability density @math{p(x)} at @var{x}
+for a Laplace distribution with width @var{a}, using the formula
+given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-laplace.tex}
+@end tex
+
+@deftypefun double gsl_cdf_laplace_P (double @var{x}, double @var{a})
+@deftypefunx double gsl_cdf_laplace_Q (double @var{x}, double @var{a})
+@deftypefunx double gsl_cdf_laplace_Pinv (double @var{P}, double @var{a})
+@deftypefunx double gsl_cdf_laplace_Qinv (double @var{Q}, double @var{a})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the Laplace
+distribution with width @var{a}.
+@end deftypefun
+
+
+@page
+@node The Exponential Power Distribution
+@section The Exponential Power Distribution
+@deftypefun double gsl_ran_exppow (const gsl_rng * @var{r}, double @var{a}, double @var{b})
+@cindex Exponential power distribution
+This function returns a random variate from the exponential power distribution
+with scale parameter @var{a} and exponent @var{b}. The distribution is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {1 \over 2 a \Gamma(1+1/b)} \exp(-|x/a|^b) dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{1 \over 2 a \Gamma(1+1/b)@} \exp(-|x/a|^b) dx
+@end example
+
+@end ifinfo
+@noindent
+for @c{$x \ge 0$}
+@math{x >= 0}. For @math{b = 1} this reduces to the Laplace
+distribution. For @math{b = 2} it has the same form as a gaussian
+distribution, but with @c{$a = \sqrt{2} \sigma$}
+@math{a = \sqrt@{2@} \sigma}.
+@end deftypefun
+
+@deftypefun double gsl_ran_exppow_pdf (double @var{x}, double @var{a}, double @var{b})
+This function computes the probability density @math{p(x)} at @var{x}
+for an exponential power distribution with scale parameter @var{a}
+and exponent @var{b}, using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-exppow.tex}
+@end tex
+
+@deftypefun double gsl_cdf_exppow_P (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_exppow_Q (double @var{x}, double @var{a}, double @var{b})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} for the exponential power distribution with
+parameters @var{a} and @var{b}.
+@end deftypefun
+
+
+@page
+@node The Cauchy Distribution
+@section The Cauchy Distribution
+@deftypefun double gsl_ran_cauchy (const gsl_rng * @var{r}, double @var{a})
+@cindex Cauchy distribution
+This function returns a random variate from the Cauchy distribution with
+scale parameter @var{a}. The probability distribution for Cauchy
+random variates is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {1 \over a\pi (1 + (x/a)^2) } dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{1 \over a\pi (1 + (x/a)^2) @} dx
+@end example
+
+@end ifinfo
+@noindent
+for @math{x} in the range @math{-\infty} to @math{+\infty}. The Cauchy
+distribution is also known as the Lorentz distribution.
+@end deftypefun
+
+@deftypefun double gsl_ran_cauchy_pdf (double @var{x}, double @var{a})
+This function computes the probability density @math{p(x)} at @var{x}
+for a Cauchy distribution with scale parameter @var{a}, using the formula
+given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-cauchy.tex}
+@end tex
+
+@deftypefun double gsl_cdf_cauchy_P (double @var{x}, double @var{a})
+@deftypefunx double gsl_cdf_cauchy_Q (double @var{x}, double @var{a})
+@deftypefunx double gsl_cdf_cauchy_Pinv (double @var{P}, double @var{a})
+@deftypefunx double gsl_cdf_cauchy_Qinv (double @var{Q}, double @var{a})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the Cauchy
+distribution with scale parameter @var{a}.
+@end deftypefun
+
+
+@page
+@node The Rayleigh Distribution
+@section The Rayleigh Distribution
+@deftypefun double gsl_ran_rayleigh (const gsl_rng * @var{r}, double @var{sigma})
+@cindex Rayleigh distribution
+This function returns a random variate from the Rayleigh distribution with
+scale parameter @var{sigma}. The distribution is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {x \over \sigma^2} \exp(- x^2/(2 \sigma^2)) dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{x \over \sigma^2@} \exp(- x^2/(2 \sigma^2)) dx
+@end example
+
+@end ifinfo
+@noindent
+for @math{x > 0}.
+@end deftypefun
+
+@deftypefun double gsl_ran_rayleigh_pdf (double @var{x}, double @var{sigma})
+This function computes the probability density @math{p(x)} at @var{x}
+for a Rayleigh distribution with scale parameter @var{sigma}, using the
+formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-rayleigh.tex}
+@end tex
+
+@deftypefun double gsl_cdf_rayleigh_P (double @var{x}, double @var{sigma})
+@deftypefunx double gsl_cdf_rayleigh_Q (double @var{x}, double @var{sigma})
+@deftypefunx double gsl_cdf_rayleigh_Pinv (double @var{P}, double @var{sigma})
+@deftypefunx double gsl_cdf_rayleigh_Qinv (double @var{Q}, double @var{sigma})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the Rayleigh
+distribution with scale parameter @var{sigma}.
+@end deftypefun
+
+
+@page
+@node The Rayleigh Tail Distribution
+@section The Rayleigh Tail Distribution
+@deftypefun double gsl_ran_rayleigh_tail (const gsl_rng * @var{r}, double @var{a}, double @var{sigma})
+@cindex Rayleigh Tail distribution
+This function returns a random variate from the tail of the Rayleigh
+distribution with scale parameter @var{sigma} and a lower limit of
+@var{a}. The distribution is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {x \over \sigma^2} \exp ((a^2 - x^2) /(2 \sigma^2)) dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{x \over \sigma^2@} \exp ((a^2 - x^2) /(2 \sigma^2)) dx
+@end example
+
+@end ifinfo
+@noindent
+for @math{x > a}.
+@end deftypefun
+
+@deftypefun double gsl_ran_rayleigh_tail_pdf (double @var{x}, double @var{a}, double @var{sigma})
+This function computes the probability density @math{p(x)} at @var{x}
+for a Rayleigh tail distribution with scale parameter @var{sigma} and
+lower limit @var{a}, using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-rayleigh-tail.tex}
+@end tex
+
+@page
+@node The Landau Distribution
+@section The Landau Distribution
+@deftypefun double gsl_ran_landau (const gsl_rng * @var{r})
+@cindex Landau distribution
+This function returns a random variate from the Landau distribution. The
+probability distribution for Landau random variates is defined
+analytically by the complex integral,
+@tex
+\beforedisplay
+$$
+p(x) =
+{1 \over {2 \pi i}} \int_{c-i\infty}^{c+i\infty} ds\, \exp(s \log(s) + x s)
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) = (1/(2 \pi i)) \int_@{c-i\infty@}^@{c+i\infty@} ds exp(s log(s) + x s)
+@end example
+@end ifinfo
+For numerical purposes it is more convenient to use the following
+equivalent form of the integral,
+@tex
+\beforedisplay
+$$
+p(x) = (1/\pi) \int_0^\infty dt \exp(-t \log(t) - x t) \sin(\pi t).
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) = (1/\pi) \int_0^\infty dt \exp(-t \log(t) - x t) \sin(\pi t).
+@end example
+@end ifinfo
+@end deftypefun
+
+@deftypefun double gsl_ran_landau_pdf (double @var{x})
+This function computes the probability density @math{p(x)} at @var{x}
+for the Landau distribution using an approximation to the formula given
+above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-landau.tex}
+@end tex
+
+@page
+@node The Levy alpha-Stable Distributions
+@section The Levy alpha-Stable Distributions
+@deftypefun double gsl_ran_levy (const gsl_rng * @var{r}, double @var{c}, double @var{alpha})
+@cindex Levy distribution
+This function returns a random variate from the Levy symmetric stable
+distribution with scale @var{c} and exponent @var{alpha}. The symmetric
+stable probability distribution is defined by a fourier transform,
+@tex
+\beforedisplay
+$$
+p(x) = {1 \over 2 \pi} \int_{-\infty}^{+\infty} dt \exp(-it x - |c t|^\alpha)
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) = @{1 \over 2 \pi@} \int_@{-\infty@}^@{+\infty@} dt \exp(-it x - |c t|^alpha)
+@end example
+
+@end ifinfo
+@noindent
+There is no explicit solution for the form of @math{p(x)} and the
+library does not define a corresponding @code{pdf} function. For
+@math{\alpha = 1} the distribution reduces to the Cauchy distribution. For
+@math{\alpha = 2} it is a Gaussian distribution with @c{$\sigma = \sqrt{2} c$}
+@math{\sigma = \sqrt@{2@} c}. For @math{\alpha < 1} the tails of the
+distribution become extremely wide.
+
+The algorithm only works for @c{$0 < \alpha \le 2$}
+@math{0 < alpha <= 2}.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-levy.tex}
+@end tex
+
+@page
+@node The Levy skew alpha-Stable Distribution
+@section The Levy skew alpha-Stable Distribution
+
+@deftypefun double gsl_ran_levy_skew (const gsl_rng * @var{r}, double @var{c}, double @var{alpha}, double @var{beta})
+@cindex Levy distribution, skew
+@cindex Skew Levy distribution
+This function returns a random variate from the Levy skew stable
+distribution with scale @var{c}, exponent @var{alpha} and skewness
+parameter @var{beta}. The skewness parameter must lie in the range
+@math{[-1,1]}. The Levy skew stable probability distribution is defined
+by a fourier transform,
+@tex
+\beforedisplay
+$$
+p(x) = {1 \over 2 \pi} \int_{-\infty}^{+\infty} dt \exp(-it x - |c t|^\alpha (1-i \beta \sign(t) \tan(\pi\alpha/2)))
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) = @{1 \over 2 \pi@} \int_@{-\infty@}^@{+\infty@} dt \exp(-it x - |c t|^alpha (1-i beta sign(t) tan(pi alpha/2)))
+@end example
+
+@end ifinfo
+@noindent
+When @math{\alpha = 1} the term @math{\tan(\pi \alpha/2)} is replaced by
+@math{-(2/\pi)\log|t|}. There is no explicit solution for the form of
+@math{p(x)} and the library does not define a corresponding @code{pdf}
+function. For @math{\alpha = 2} the distribution reduces to a Gaussian
+distribution with @c{$\sigma = \sqrt{2} c$}
+@math{\sigma = \sqrt@{2@} c} and the skewness parameter has no effect.
+For @math{\alpha < 1} the tails of the distribution become extremely
+wide. The symmetric distribution corresponds to @math{\beta =
+0}.
+
+The algorithm only works for @c{$0 < \alpha \le 2$}
+@math{0 < alpha <= 2}.
+@end deftypefun
+
+The Levy alpha-stable distributions have the property that if @math{N}
+alpha-stable variates are drawn from the distribution @math{p(c, \alpha,
+\beta)} then the sum @math{Y = X_1 + X_2 + \dots + X_N} will also be
+distributed as an alpha-stable variate,
+@c{$p(N^{1/\alpha} c, \alpha, \beta)$}
+@math{p(N^(1/\alpha) c, \alpha, \beta)}.
+
+@comment PDF not available because there is no analytic expression for it
+@comment
+@comment @deftypefun double gsl_ran_levy_pdf (double @var{x}, double @var{mu})
+@comment This function computes the probability density @math{p(x)} at @var{x}
+@comment for a symmetric Levy distribution with scale parameter @var{mu} and
+@comment exponent @var{a}, using the formula given above.
+@comment @end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-levyskew.tex}
+@end tex
+
+@page
+@node The Gamma Distribution
+@section The Gamma Distribution
+@deftypefun double gsl_ran_gamma (const gsl_rng * @var{r}, double @var{a}, double @var{b})
+@cindex Gamma distribution
+This function returns a random variate from the gamma
+distribution. The distribution function is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {1 \over \Gamma(a) b^a} x^{a-1} e^{-x/b} dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{1 \over \Gamma(a) b^a@} x^@{a-1@} e^@{-x/b@} dx
+@end example
+
+@end ifinfo
+@noindent
+for @math{x > 0}.
+@comment If @xmath{X} and @xmath{Y} are independent gamma-distributed random
+@comment variables of order @xmath{a} and @xmath{b}, then @xmath{X+Y} has a gamma
+@comment distribution of order @xmath{a+b}.
+
+@cindex Erlang distribution
+The gamma distribution with an integer parameter @var{a} is known as the Erlang distribution.
+
+The variates are computed using the Marsaglia-Tsang fast gamma method.
+This function for this method was previously called
+@code{gsl_ran_gamma_mt} and can still be accessed using this name.
+@end deftypefun
+
+@deftypefun double gsl_ran_gamma_knuth (const gsl_rng * @var{r}, double @var{a}, double @var{b})
+This function returns a gamma variate using the algorithms from Knuth (vol 2).
+@end deftypefun
+
+@deftypefun double gsl_ran_gamma_pdf (double @var{x}, double @var{a}, double @var{b})
+This function computes the probability density @math{p(x)} at @var{x}
+for a gamma distribution with parameters @var{a} and @var{b}, using the
+formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-gamma.tex}
+@end tex
+
+@deftypefun double gsl_cdf_gamma_P (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_gamma_Q (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_gamma_Pinv (double @var{P}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_gamma_Qinv (double @var{Q}, double @var{a}, double @var{b})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the gamma
+distribution with parameters @var{a} and @var{b}.
+@end deftypefun
+
+@page
+@node The Flat (Uniform) Distribution
+@section The Flat (Uniform) Distribution
+@deftypefun double gsl_ran_flat (const gsl_rng * @var{r}, double @var{a}, double @var{b})
+@cindex flat distribution
+@cindex uniform distribution
+This function returns a random variate from the flat (uniform)
+distribution from @var{a} to @var{b}. The distribution is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {1 \over (b-a)} dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{1 \over (b-a)@} dx
+@end example
+
+@end ifinfo
+@noindent
+if @c{$a \le x < b$}
+@math{a <= x < b} and 0 otherwise.
+@end deftypefun
+
+@deftypefun double gsl_ran_flat_pdf (double @var{x}, double @var{a}, double @var{b})
+This function computes the probability density @math{p(x)} at @var{x}
+for a uniform distribution from @var{a} to @var{b}, using the formula
+given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-flat.tex}
+@end tex
+
+@deftypefun double gsl_cdf_flat_P (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_flat_Q (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_flat_Pinv (double @var{P}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_flat_Qinv (double @var{Q}, double @var{a}, double @var{b})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for a uniform distribution
+from @var{a} to @var{b}.
+@end deftypefun
+
+
+@page
+@node The Lognormal Distribution
+@section The Lognormal Distribution
+@deftypefun double gsl_ran_lognormal (const gsl_rng * @var{r}, double @var{zeta}, double @var{sigma})
+@cindex Lognormal distribution
+This function returns a random variate from the lognormal
+distribution. The distribution function is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {1 \over x \sqrt{2 \pi \sigma^2}} \exp(-(\ln(x) - \zeta)^2/2 \sigma^2) dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{1 \over x \sqrt@{2 \pi \sigma^2@} @} \exp(-(\ln(x) - \zeta)^2/2 \sigma^2) dx
+@end example
+
+@end ifinfo
+@noindent
+for @math{x > 0}.
+@end deftypefun
+
+@deftypefun double gsl_ran_lognormal_pdf (double @var{x}, double @var{zeta}, double @var{sigma})
+This function computes the probability density @math{p(x)} at @var{x}
+for a lognormal distribution with parameters @var{zeta} and @var{sigma},
+using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-lognormal.tex}
+@end tex
+
+@deftypefun double gsl_cdf_lognormal_P (double @var{x}, double @var{zeta}, double @var{sigma})
+@deftypefunx double gsl_cdf_lognormal_Q (double @var{x}, double @var{zeta}, double @var{sigma})
+@deftypefunx double gsl_cdf_lognormal_Pinv (double @var{P}, double @var{zeta}, double @var{sigma})
+@deftypefunx double gsl_cdf_lognormal_Qinv (double @var{Q}, double @var{zeta}, double @var{sigma})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the lognormal
+distribution with parameters @var{zeta} and @var{sigma}.
+@end deftypefun
+
+
+@page
+@node The Chi-squared Distribution
+@section The Chi-squared Distribution
+The chi-squared distribution arises in statistics. If @math{Y_i} are
+@math{n} independent gaussian random variates with unit variance then the
+sum-of-squares,
+@tex
+\beforedisplay
+$$
+X_i = \sum_i Y_i^2
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+X_i = \sum_i Y_i^2
+@end example
+
+@end ifinfo
+@noindent
+has a chi-squared distribution with @math{n} degrees of freedom.
+
+@deftypefun double gsl_ran_chisq (const gsl_rng * @var{r}, double @var{nu})
+@cindex Chi-squared distribution
+This function returns a random variate from the chi-squared distribution
+with @var{nu} degrees of freedom. The distribution function is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {1 \over 2 \Gamma(\nu/2) } (x/2)^{\nu/2 - 1} \exp(-x/2) dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{1 \over 2 \Gamma(\nu/2) @} (x/2)^@{\nu/2 - 1@} \exp(-x/2) dx
+@end example
+
+@end ifinfo
+@noindent
+for @c{$x \ge 0$}
+@math{x >= 0}.
+@end deftypefun
+
+@deftypefun double gsl_ran_chisq_pdf (double @var{x}, double @var{nu})
+This function computes the probability density @math{p(x)} at @var{x}
+for a chi-squared distribution with @var{nu} degrees of freedom, using
+the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-chisq.tex}
+@end tex
+
+@deftypefun double gsl_cdf_chisq_P (double @var{x}, double @var{nu})
+@deftypefunx double gsl_cdf_chisq_Q (double @var{x}, double @var{nu})
+@deftypefunx double gsl_cdf_chisq_Pinv (double @var{P}, double @var{nu})
+@deftypefunx double gsl_cdf_chisq_Qinv (double @var{Q}, double @var{nu})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the chi-squared
+distribution with @var{nu} degrees of freedom.
+@end deftypefun
+
+
+
+@page
+@node The F-distribution
+@section The F-distribution
+The F-distribution arises in statistics. If @math{Y_1} and @math{Y_2}
+are chi-squared deviates with @math{\nu_1} and @math{\nu_2} degrees of
+freedom then the ratio,
+@tex
+\beforedisplay
+$$
+X = { (Y_1 / \nu_1) \over (Y_2 / \nu_2) }
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+X = @{ (Y_1 / \nu_1) \over (Y_2 / \nu_2) @}
+@end example
+
+@end ifinfo
+@noindent
+has an F-distribution @math{F(x;\nu_1,\nu_2)}.
+
+@deftypefun double gsl_ran_fdist (const gsl_rng * @var{r}, double @var{nu1}, double @var{nu2})
+@cindex F-distribution
+This function returns a random variate from the F-distribution with degrees of freedom @var{nu1} and @var{nu2}. The distribution function is,
+@tex
+\beforedisplay
+$$
+p(x) dx =
+ { \Gamma((\nu_1 + \nu_2)/2)
+ \over \Gamma(\nu_1/2) \Gamma(\nu_2/2) }
+ \nu_1^{\nu_1/2} \nu_2^{\nu_2/2}
+ x^{\nu_1/2 - 1} (\nu_2 + \nu_1 x)^{-\nu_1/2 -\nu_2/2}
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx =
+ @{ \Gamma((\nu_1 + \nu_2)/2)
+ \over \Gamma(\nu_1/2) \Gamma(\nu_2/2) @}
+ \nu_1^@{\nu_1/2@} \nu_2^@{\nu_2/2@}
+ x^@{\nu_1/2 - 1@} (\nu_2 + \nu_1 x)^@{-\nu_1/2 -\nu_2/2@}
+@end example
+
+@end ifinfo
+@noindent
+for @c{$x \ge 0$}
+@math{x >= 0}.
+@end deftypefun
+
+@deftypefun double gsl_ran_fdist_pdf (double @var{x}, double @var{nu1}, double @var{nu2})
+This function computes the probability density @math{p(x)} at @var{x}
+for an F-distribution with @var{nu1} and @var{nu2} degrees of freedom,
+using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-fdist.tex}
+@end tex
+
+@deftypefun double gsl_cdf_fdist_P (double @var{x}, double @var{nu1}, double @var{nu2})
+@deftypefunx double gsl_cdf_fdist_Q (double @var{x}, double @var{nu1}, double @var{nu2})
+@deftypefunx double gsl_cdf_fdist_Pinv (double @var{P}, double @var{nu1}, double @var{nu2})
+@deftypefunx double gsl_cdf_fdist_Qinv (double @var{Q}, double @var{nu1}, double @var{nu2})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the F-distribution
+with @var{nu1} and @var{nu2} degrees of freedom.
+@end deftypefun
+
+@page
+@node The t-distribution
+@section The t-distribution
+The t-distribution arises in statistics. If @math{Y_1} has a normal
+distribution and @math{Y_2} has a chi-squared distribution with
+@math{\nu} degrees of freedom then the ratio,
+@tex
+\beforedisplay
+$$
+X = { Y_1 \over \sqrt{Y_2 / \nu} }
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+X = @{ Y_1 \over \sqrt@{Y_2 / \nu@} @}
+@end example
+
+@end ifinfo
+@noindent
+has a t-distribution @math{t(x;\nu)} with @math{\nu} degrees of freedom.
+
+@deftypefun double gsl_ran_tdist (const gsl_rng * @var{r}, double @var{nu})
+@cindex t-distribution
+@cindex Student t-distribution
+This function returns a random variate from the t-distribution. The
+distribution function is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {\Gamma((\nu + 1)/2) \over \sqrt{\pi \nu} \Gamma(\nu/2)}
+ (1 + x^2/\nu)^{-(\nu + 1)/2} dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{\Gamma((\nu + 1)/2) \over \sqrt@{\pi \nu@} \Gamma(\nu/2)@}
+ (1 + x^2/\nu)^@{-(\nu + 1)/2@} dx
+@end example
+
+@end ifinfo
+@noindent
+for @math{-\infty < x < +\infty}.
+@end deftypefun
+
+@deftypefun double gsl_ran_tdist_pdf (double @var{x}, double @var{nu})
+This function computes the probability density @math{p(x)} at @var{x}
+for a t-distribution with @var{nu} degrees of freedom, using the formula
+given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-tdist.tex}
+@end tex
+
+@deftypefun double gsl_cdf_tdist_P (double @var{x}, double @var{nu})
+@deftypefunx double gsl_cdf_tdist_Q (double @var{x}, double @var{nu})
+@deftypefunx double gsl_cdf_tdist_Pinv (double @var{P}, double @var{nu})
+@deftypefunx double gsl_cdf_tdist_Qinv (double @var{Q}, double @var{nu})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the t-distribution
+with @var{nu} degrees of freedom.
+@end deftypefun
+
+@page
+@node The Beta Distribution
+@section The Beta Distribution
+@deftypefun double gsl_ran_beta (const gsl_rng * @var{r}, double @var{a}, double @var{b})
+@cindex Beta distribution
+This function returns a random variate from the beta
+distribution. The distribution function is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {\Gamma(a+b) \over \Gamma(a) \Gamma(b)} x^{a-1} (1-x)^{b-1} dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{\Gamma(a+b) \over \Gamma(a) \Gamma(b)@} x^@{a-1@} (1-x)^@{b-1@} dx
+@end example
+
+@end ifinfo
+@noindent
+for @c{$0 \le x \le 1$}
+@math{0 <= x <= 1}.
+@end deftypefun
+
+@deftypefun double gsl_ran_beta_pdf (double @var{x}, double @var{a}, double @var{b})
+This function computes the probability density @math{p(x)} at @var{x}
+for a beta distribution with parameters @var{a} and @var{b}, using the
+formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-beta.tex}
+@end tex
+
+@deftypefun double gsl_cdf_beta_P (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_beta_Q (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_beta_Pinv (double @var{P}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_beta_Qinv (double @var{Q}, double @var{a}, double @var{b})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the beta
+distribution with parameters @var{a} and @var{b}.
+@end deftypefun
+
+@page
+@node The Logistic Distribution
+@section The Logistic Distribution
+
+@deftypefun double gsl_ran_logistic (const gsl_rng * @var{r}, double @var{a})
+@cindex Logistic distribution
+This function returns a random variate from the logistic
+distribution. The distribution function is,
+@tex
+\beforedisplay
+$$
+p(x) dx = { \exp(-x/a) \over a (1 + \exp(-x/a))^2 } dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{ \exp(-x/a) \over a (1 + \exp(-x/a))^2 @} dx
+@end example
+
+@end ifinfo
+@noindent
+for @math{-\infty < x < +\infty}.
+@end deftypefun
+
+@deftypefun double gsl_ran_logistic_pdf (double @var{x}, double @var{a})
+This function computes the probability density @math{p(x)} at @var{x}
+for a logistic distribution with scale parameter @var{a}, using the
+formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-logistic.tex}
+@end tex
+
+@deftypefun double gsl_cdf_logistic_P (double @var{x}, double @var{a})
+@deftypefunx double gsl_cdf_logistic_Q (double @var{x}, double @var{a})
+@deftypefunx double gsl_cdf_logistic_Pinv (double @var{P}, double @var{a})
+@deftypefunx double gsl_cdf_logistic_Qinv (double @var{Q}, double @var{a})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the logistic
+distribution with scale parameter @var{a}.
+@end deftypefun
+
+@page
+@node The Pareto Distribution
+@section The Pareto Distribution
+@deftypefun double gsl_ran_pareto (const gsl_rng * @var{r}, double @var{a}, double @var{b})
+@cindex Pareto distribution
+This function returns a random variate from the Pareto distribution of
+order @var{a}. The distribution function is,
+@tex
+\beforedisplay
+$$
+p(x) dx = (a/b) / (x/b)^{a+1} dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = (a/b) / (x/b)^@{a+1@} dx
+@end example
+
+@end ifinfo
+@noindent
+for @c{$x \ge b$}
+@math{x >= b}.
+@end deftypefun
+
+@deftypefun double gsl_ran_pareto_pdf (double @var{x}, double @var{a}, double @var{b})
+This function computes the probability density @math{p(x)} at @var{x}
+for a Pareto distribution with exponent @var{a} and scale @var{b}, using
+the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-pareto.tex}
+@end tex
+
+@deftypefun double gsl_cdf_pareto_P (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_pareto_Q (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_pareto_Pinv (double @var{P}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_pareto_Qinv (double @var{Q}, double @var{a}, double @var{b})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the Pareto
+distribution with exponent @var{a} and scale @var{b}.
+@end deftypefun
+
+@page
+@node Spherical Vector Distributions
+@section Spherical Vector Distributions
+
+The spherical distributions generate random vectors, located on a
+spherical surface. They can be used as random directions, for example in
+the steps of a random walk.
+
+@deftypefun void gsl_ran_dir_2d (const gsl_rng * @var{r}, double * @var{x}, double * @var{y})
+@deftypefunx void gsl_ran_dir_2d_trig_method (const gsl_rng * @var{r}, double * @var{x}, double * @var{y})
+@cindex 2D random direction vector
+@cindex direction vector, random 2D
+@cindex spherical random variates, 2D
+This function returns a random direction vector @math{v} =
+(@var{x},@var{y}) in two dimensions. The vector is normalized such that
+@math{|v|^2 = x^2 + y^2 = 1}. The obvious way to do this is to take a
+uniform random number between 0 and @math{2\pi} and let @var{x} and
+@var{y} be the sine and cosine respectively. Two trig functions would
+have been expensive in the old days, but with modern hardware
+implementations, this is sometimes the fastest way to go. This is the
+case for the Pentium (but not the case for the Sun Sparcstation).
+One can avoid the trig evaluations by choosing @var{x} and
+@var{y} in the interior of a unit circle (choose them at random from the
+interior of the enclosing square, and then reject those that are outside
+the unit circle), and then dividing by @c{$\sqrt{x^2 + y^2}$}
+@math{\sqrt@{x^2 + y^2@}}.
+A much cleverer approach, attributed to von Neumann (See Knuth, v2, 3rd
+ed, p140, exercise 23), requires neither trig nor a square root. In
+this approach, @var{u} and @var{v} are chosen at random from the
+interior of a unit circle, and then @math{x=(u^2-v^2)/(u^2+v^2)} and
+@math{y=2uv/(u^2+v^2)}.
+@end deftypefun
+
+@deftypefun void gsl_ran_dir_3d (const gsl_rng * @var{r}, double * @var{x}, double * @var{y}, double * @var{z})
+@cindex 3D random direction vector
+@cindex direction vector, random 3D
+@cindex spherical random variates, 3D
+This function returns a random direction vector @math{v} =
+(@var{x},@var{y},@var{z}) in three dimensions. The vector is normalized
+such that @math{|v|^2 = x^2 + y^2 + z^2 = 1}. The method employed is
+due to Robert E. Knop (CACM 13, 326 (1970)), and explained in Knuth, v2,
+3rd ed, p136. It uses the surprising fact that the distribution
+projected along any axis is actually uniform (this is only true for 3
+dimensions).
+@end deftypefun
+
+@deftypefun void gsl_ran_dir_nd (const gsl_rng * @var{r}, size_t @var{n}, double * @var{x})
+@cindex N-dimensional random direction vector
+@cindex direction vector, random N-dimensional
+@cindex spherical random variates, N-dimensional
+
+This function returns a random direction vector
+@c{$v = (x_1,x_2,\ldots,x_n)$}
+@math{v = (x_1,x_2,...,x_n)} in @var{n} dimensions. The vector is normalized
+such that
+@c{$|v|^2 = x_1^2 + x_2^2 + \cdots + x_n^2 = 1$}
+@math{|v|^2 = x_1^2 + x_2^2 + ... + x_n^2 = 1}. The method
+uses the fact that a multivariate gaussian distribution is spherically
+symmetric. Each component is generated to have a gaussian distribution,
+and then the components are normalized. The method is described by
+Knuth, v2, 3rd ed, p135--136, and attributed to G. W. Brown, Modern
+Mathematics for the Engineer (1956).
+@end deftypefun
+
+@page
+@node The Weibull Distribution
+@section The Weibull Distribution
+@deftypefun double gsl_ran_weibull (const gsl_rng * @var{r}, double @var{a}, double @var{b})
+@cindex Weibull distribution
+This function returns a random variate from the Weibull distribution. The
+distribution function is,
+@tex
+\beforedisplay
+$$
+p(x) dx = {b \over a^b} x^{b-1} \exp(-(x/a)^b) dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = @{b \over a^b@} x^@{b-1@} \exp(-(x/a)^b) dx
+@end example
+
+@end ifinfo
+@noindent
+for @c{$x \ge 0$}
+@math{x >= 0}.
+@end deftypefun
+
+@deftypefun double gsl_ran_weibull_pdf (double @var{x}, double @var{a}, double @var{b})
+This function computes the probability density @math{p(x)} at @var{x}
+for a Weibull distribution with scale @var{a} and exponent @var{b},
+using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-weibull.tex}
+@end tex
+
+@deftypefun double gsl_cdf_weibull_P (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_weibull_Q (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_weibull_Pinv (double @var{P}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_weibull_Qinv (double @var{Q}, double @var{a}, double @var{b})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the Weibull
+distribution with scale @var{a} and exponent @var{b}.
+@end deftypefun
+
+
+@page
+@node The Type-1 Gumbel Distribution
+@section The Type-1 Gumbel Distribution
+@deftypefun double gsl_ran_gumbel1 (const gsl_rng * @var{r}, double @var{a}, double @var{b})
+@cindex Gumbel distribution (Type 1)
+@cindex Type 1 Gumbel distribution, random variates
+This function returns a random variate from the Type-1 Gumbel
+distribution. The Type-1 Gumbel distribution function is,
+@tex
+\beforedisplay
+$$
+p(x) dx = a b \exp(-(b \exp(-ax) + ax)) dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = a b \exp(-(b \exp(-ax) + ax)) dx
+@end example
+
+@end ifinfo
+@noindent
+for @math{-\infty < x < \infty}.
+@end deftypefun
+
+@deftypefun double gsl_ran_gumbel1_pdf (double @var{x}, double @var{a}, double @var{b})
+This function computes the probability density @math{p(x)} at @var{x}
+for a Type-1 Gumbel distribution with parameters @var{a} and @var{b},
+using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-gumbel1.tex}
+@end tex
+
+@deftypefun double gsl_cdf_gumbel1_P (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_gumbel1_Q (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_gumbel1_Pinv (double @var{P}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_gumbel1_Qinv (double @var{Q}, double @var{a}, double @var{b})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the Type-1 Gumbel
+distribution with parameters @var{a} and @var{b}.
+@end deftypefun
+
+
+@page
+@node The Type-2 Gumbel Distribution
+@section The Type-2 Gumbel Distribution
+@deftypefun double gsl_ran_gumbel2 (const gsl_rng * @var{r}, double @var{a}, double @var{b})
+@cindex Gumbel distribution (Type 2)
+@cindex Type 2 Gumbel distribution
+This function returns a random variate from the Type-2 Gumbel
+distribution. The Type-2 Gumbel distribution function is,
+@tex
+\beforedisplay
+$$
+p(x) dx = a b x^{-a-1} \exp(-b x^{-a}) dx
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(x) dx = a b x^@{-a-1@} \exp(-b x^@{-a@}) dx
+@end example
+
+@end ifinfo
+@noindent
+for @math{0 < x < \infty}.
+@end deftypefun
+
+@deftypefun double gsl_ran_gumbel2_pdf (double @var{x}, double @var{a}, double @var{b})
+This function computes the probability density @math{p(x)} at @var{x}
+for a Type-2 Gumbel distribution with parameters @var{a} and @var{b},
+using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-gumbel2.tex}
+@end tex
+
+@deftypefun double gsl_cdf_gumbel2_P (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_gumbel2_Q (double @var{x}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_gumbel2_Pinv (double @var{P}, double @var{a}, double @var{b})
+@deftypefunx double gsl_cdf_gumbel2_Qinv (double @var{Q}, double @var{a}, double @var{b})
+These functions compute the cumulative distribution functions
+@math{P(x)}, @math{Q(x)} and their inverses for the Type-2 Gumbel
+distribution with parameters @var{a} and @var{b}.
+@end deftypefun
+
+
+@page
+@node The Dirichlet Distribution
+@section The Dirichlet Distribution
+@deftypefun void gsl_ran_dirichlet (const gsl_rng * @var{r}, size_t @var{K}, const double @var{alpha}[], double @var{theta}[])
+@cindex Dirichlet distribution
+This function returns an array of @var{K} random variates from a Dirichlet
+distribution of order @var{K}-1. The distribution function is
+@tex
+\beforedisplay
+$$
+p(\theta_1,\ldots,\theta_K) \, d\theta_1 \cdots d\theta_K =
+ {1 \over Z} \prod_{i=1}^{K} \theta_i^{\alpha_i - 1}
+ \; \delta(1 -\sum_{i=1}^K \theta_i) d\theta_1 \cdots d\theta_K
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(\theta_1, ..., \theta_K) d\theta_1 ... d\theta_K =
+ (1/Z) \prod_@{i=1@}^K \theta_i^@{\alpha_i - 1@} \delta(1 -\sum_@{i=1@}^K \theta_i) d\theta_1 ... d\theta_K
+@end example
+
+@end ifinfo
+@noindent
+for @c{$\theta_i \ge 0$}
+@math{theta_i >= 0}
+and @c{$\alpha_i \ge 0$}
+@math{alpha_i >= 0}. The delta function ensures that @math{\sum \theta_i = 1}.
+The normalization factor @math{Z} is
+@tex
+\beforedisplay
+$$
+Z = {\prod_{i=1}^K \Gamma(\alpha_i) \over \Gamma( \sum_{i=1}^K \alpha_i)}
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+Z = @{\prod_@{i=1@}^K \Gamma(\alpha_i)@} / @{\Gamma( \sum_@{i=1@}^K \alpha_i)@}
+@end example
+@end ifinfo
+
+The random variates are generated by sampling @var{K} values
+from gamma distributions with parameters
+@c{$a=\alpha_i$, $b=1$}
+@math{a=alpha_i, b=1},
+and renormalizing.
+See A.M. Law, W.D. Kelton, @cite{Simulation Modeling and Analysis} (1991).
+@end deftypefun
+
+@deftypefun double gsl_ran_dirichlet_pdf (size_t @var{K}, const double @var{alpha}[], const double @var{theta}[])
+This function computes the probability density
+@c{$p(\theta_1, \ldots , \theta_K)$}
+@math{p(\theta_1, ... , \theta_K)}
+at @var{theta}[@var{K}] for a Dirichlet distribution with parameters
+@var{alpha}[@var{K}], using the formula given above.
+@end deftypefun
+
+@deftypefun double gsl_ran_dirichlet_lnpdf (size_t @var{K}, const double @var{alpha}[], const double @var{theta}[])
+This function computes the logarithm of the probability density
+@c{$p(\theta_1, \ldots , \theta_K)$}
+@math{p(\theta_1, ... , \theta_K)}
+for a Dirichlet distribution with parameters
+@var{alpha}[@var{K}].
+@end deftypefun
+
+@page
+@node General Discrete Distributions
+@section General Discrete Distributions
+
+Given @math{K} discrete events with different probabilities @math{P[k]},
+produce a random value @math{k} consistent with its probability.
+
+The obvious way to do this is to preprocess the probability list by
+generating a cumulative probability array with @math{K+1} elements:
+@tex
+\beforedisplay
+$$
+\eqalign{
+C[0] & = 0 \cr
+C[k+1] &= C[k]+P[k].
+}
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+ C[0] = 0
+C[k+1] = C[k]+P[k].
+@end example
+
+@end ifinfo
+@noindent
+Note that this construction produces @math{C[K]=1}. Now choose a
+uniform deviate @math{u} between 0 and 1, and find the value of @math{k}
+such that @c{$C[k] \le u < C[k+1]$}
+@math{C[k] <= u < C[k+1]}.
+Although this in principle requires of order @math{\log K} steps per
+random number generation, they are fast steps, and if you use something
+like @math{\lfloor uK \rfloor} as a starting point, you can often do
+pretty well.
+
+But faster methods have been devised. Again, the idea is to preprocess
+the probability list, and save the result in some form of lookup table;
+then the individual calls for a random discrete event can go rapidly.
+An approach invented by G. Marsaglia (Generating discrete random numbers
+in a computer, Comm ACM 6, 37--38 (1963)) is very clever, and readers
+interested in examples of good algorithm design are directed to this
+short and well-written paper. Unfortunately, for large @math{K},
+Marsaglia's lookup table can be quite large.
+
+A much better approach is due to Alastair J. Walker (An efficient method
+for generating discrete random variables with general distributions, ACM
+Trans on Mathematical Software 3, 253--256 (1977); see also Knuth, v2,
+3rd ed, p120--121,139). This requires two lookup tables, one floating
+point and one integer, but both only of size @math{K}. After
+preprocessing, the random numbers are generated in O(1) time, even for
+large @math{K}. The preprocessing suggested by Walker requires
+@math{O(K^2)} effort, but that is not actually necessary, and the
+implementation provided here only takes @math{O(K)} effort. In general,
+more preprocessing leads to faster generation of the individual random
+numbers, but a diminishing return is reached pretty early. Knuth points
+out that the optimal preprocessing is combinatorially difficult for
+large @math{K}.
+
+This method can be used to speed up some of the discrete random number
+generators below, such as the binomial distribution. To use it for
+something like the Poisson Distribution, a modification would have to
+be made, since it only takes a finite set of @math{K} outcomes.
+
+@deftypefun {gsl_ran_discrete_t *} gsl_ran_discrete_preproc (size_t @var{K}, const double * @var{P})
+@cindex Discrete random numbers
+@cindex Discrete random numbers, preprocessing
+This function returns a pointer to a structure that contains the lookup
+table for the discrete random number generator. The array @var{P}[] contains
+the probabilities of the discrete events; these array elements must all be
+positive, but they needn't add up to one (so you can think of them more
+generally as ``weights'')---the preprocessor will normalize appropriately.
+This return value is used
+as an argument for the @code{gsl_ran_discrete} function below.
+@end deftypefun
+
+@deftypefun {size_t} gsl_ran_discrete (const gsl_rng * @var{r}, const gsl_ran_discrete_t * @var{g})
+@cindex Discrete random numbers
+After the preprocessor, above, has been called, you use this function to
+get the discrete random numbers.
+@end deftypefun
+
+@deftypefun {double} gsl_ran_discrete_pdf (size_t @var{k}, const gsl_ran_discrete_t * @var{g})
+@cindex Discrete random numbers
+Returns the probability @math{P[k]} of observing the variable @var{k}.
+Since @math{P[k]} is not stored as part of the lookup table, it must be
+recomputed; this computation takes @math{O(K)}, so if @var{K} is large
+and you care about the original array @math{P[k]} used to create the
+lookup table, then you should just keep this original array @math{P[k]}
+around.
+@end deftypefun
+
+@deftypefun {void} gsl_ran_discrete_free (gsl_ran_discrete_t * @var{g})
+@cindex Discrete random numbers
+De-allocates the lookup table pointed to by @var{g}.
+@end deftypefun
+
+@page
+@node The Poisson Distribution
+@section The Poisson Distribution
+@deftypefun {unsigned int} gsl_ran_poisson (const gsl_rng * @var{r}, double @var{mu})
+@cindex Poisson random numbers
+This function returns a random integer from the Poisson distribution
+with mean @var{mu}. The probability distribution for Poisson variates is,
+@tex
+\beforedisplay
+$$
+p(k) = {\mu^k \over k!} \exp(-\mu)
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(k) = @{\mu^k \over k!@} \exp(-\mu)
+@end example
+
+@end ifinfo
+@noindent
+for @c{$k \ge 0$}
+@math{k >= 0}.
+@end deftypefun
+
+@deftypefun double gsl_ran_poisson_pdf (unsigned int @var{k}, double @var{mu})
+This function computes the probability @math{p(k)} of obtaining @var{k}
+from a Poisson distribution with mean @var{mu}, using the formula
+given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-poisson.tex}
+@end tex
+
+@deftypefun double gsl_cdf_poisson_P (unsigned int @var{k}, double @var{mu})
+@deftypefunx double gsl_cdf_poisson_Q (unsigned int @var{k}, double @var{mu})
+These functions compute the cumulative distribution functions
+@math{P(k)}, @math{Q(k)} for the Poisson distribution with parameter
+@var{mu}.
+@end deftypefun
+
+
+@page
+@node The Bernoulli Distribution
+@section The Bernoulli Distribution
+@deftypefun {unsigned int} gsl_ran_bernoulli (const gsl_rng * @var{r}, double @var{p})
+@cindex Bernoulli trial, random variates
+This function returns either 0 or 1, the result of a Bernoulli trial
+with probability @var{p}. The probability distribution for a Bernoulli
+trial is,
+@tex
+\beforedisplay
+$$
+\eqalign{
+p(0) & = 1 - p \cr
+p(1) & = p
+}
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(0) = 1 - p
+p(1) = p
+@end example
+@end ifinfo
+
+@end deftypefun
+
+@deftypefun double gsl_ran_bernoulli_pdf (unsigned int @var{k}, double @var{p})
+This function computes the probability @math{p(k)} of obtaining
+@var{k} from a Bernoulli distribution with probability parameter
+@var{p}, using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-bernoulli.tex}
+@end tex
+
+@page
+@node The Binomial Distribution
+@section The Binomial Distribution
+@deftypefun {unsigned int} gsl_ran_binomial (const gsl_rng * @var{r}, double @var{p}, unsigned int @var{n})
+@cindex Binomial random variates
+This function returns a random integer from the binomial distribution,
+the number of successes in @var{n} independent trials with probability
+@var{p}. The probability distribution for binomial variates is,
+@tex
+\beforedisplay
+$$
+p(k) = {n! \over k! (n-k)!} p^k (1-p)^{n-k}
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(k) = @{n! \over k! (n-k)! @} p^k (1-p)^@{n-k@}
+@end example
+
+@end ifinfo
+@noindent
+for @c{$0 \le k \le n$}
+@math{0 <= k <= n}.
+@end deftypefun
+
+@deftypefun double gsl_ran_binomial_pdf (unsigned int @var{k}, double @var{p}, unsigned int @var{n})
+This function computes the probability @math{p(k)} of obtaining @var{k}
+from a binomial distribution with parameters @var{p} and @var{n}, using
+the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-binomial.tex}
+@end tex
+
+@deftypefun double gsl_cdf_binomial_P (unsigned int @var{k}, double @var{p}, unsigned int @var{n})
+@deftypefunx double gsl_cdf_binomial_Q (unsigned int @var{k}, double @var{p}, unsigned int @var{n})
+These functions compute the cumulative distribution functions
+@math{P(k)}, @math{Q(k)} for the binomial
+distribution with parameters @var{p} and @var{n}.
+@end deftypefun
+
+
+@page
+@node The Multinomial Distribution
+@section The Multinomial Distribution
+@deftypefun void gsl_ran_multinomial (const gsl_rng * @var{r}, size_t @var{K}, unsigned int @var{N}, const double @var{p}[], unsigned int @var{n}[])
+@cindex Multinomial distribution
+
+This function computes a random sample @var{n}[] from the multinomial
+distribution formed by @var{N} trials from an underlying distribution
+@var{p}[@var{K}]. The distribution function for @var{n}[] is,
+@tex
+\beforedisplay
+$$
+P(n_1, n_2,\cdots, n_K) = {{ N!}\over{n_1 ! n_2 ! \cdots n_K !}} \,
+ p_1^{n_1} p_2^{n_2} \cdots p_K^{n_K}
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+P(n_1, n_2, ..., n_K) =
+ (N!/(n_1! n_2! ... n_K!)) p_1^n_1 p_2^n_2 ... p_K^n_K
+@end example
+
+@end ifinfo
+@noindent
+where @c{($n_1$, $n_2$, $\ldots$, $n_K$)}
+@math{(n_1, n_2, ..., n_K)}
+are nonnegative integers with
+@c{$\sum_{k=1}^{K} n_k =N$}
+@math{sum_@{k=1@}^K n_k = N},
+and
+@c{$(p_1, p_2, \ldots, p_K)$}
+@math{(p_1, p_2, ..., p_K)}
+is a probability distribution with @math{\sum p_i = 1}.
+If the array @var{p}[@var{K}] is not normalized then its entries will be
+treated as weights and normalized appropriately. The arrays @var{n}[]
+and @var{p}[] must both be of length @var{K}.
+
+Random variates are generated using the conditional binomial method (see
+C.S. David, @cite{The computer generation of multinomial random
+variates}, Comp. Stat. Data Anal. 16 (1993) 205--217 for details).
+@end deftypefun
+
+@deftypefun double gsl_ran_multinomial_pdf (size_t @var{K}, const double @var{p}[], const unsigned int @var{n}[])
+This function computes the probability
+@c{$P(n_1, n_2, \ldots, n_K)$}
+@math{P(n_1, n_2, ..., n_K)}
+of sampling @var{n}[@var{K}] from a multinomial distribution
+with parameters @var{p}[@var{K}], using the formula given above.
+@end deftypefun
+
+@deftypefun double gsl_ran_multinomial_lnpdf (size_t @var{K}, const double @var{p}[], const unsigned int @var{n}[])
+This function returns the logarithm of the probability for the
+multinomial distribution @c{$P(n_1, n_2, \ldots, n_K)$}
+@math{P(n_1, n_2, ..., n_K)} with parameters @var{p}[@var{K}].
+@end deftypefun
+
+@page
+@node The Negative Binomial Distribution
+@section The Negative Binomial Distribution
+@deftypefun {unsigned int} gsl_ran_negative_binomial (const gsl_rng * @var{r}, double @var{p}, double @var{n})
+@cindex Negative Binomial distribution, random variates
+This function returns a random integer from the negative binomial
+distribution, the number of failures occurring before @var{n} successes
+in independent trials with probability @var{p} of success. The
+probability distribution for negative binomial variates is,
+@tex
+\beforedisplay
+$$
+p(k) = {\Gamma(n + k) \over \Gamma(k+1) \Gamma(n) } p^n (1-p)^k
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(k) = @{\Gamma(n + k) \over \Gamma(k+1) \Gamma(n) @} p^n (1-p)^k
+@end example
+
+@end ifinfo
+@noindent
+Note that @math{n} is not required to be an integer.
+@end deftypefun
+
+@deftypefun double gsl_ran_negative_binomial_pdf (unsigned int @var{k}, double @var{p}, double @var{n})
+This function computes the probability @math{p(k)} of obtaining @var{k}
+from a negative binomial distribution with parameters @var{p} and
+@var{n}, using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-nbinomial.tex}
+@end tex
+
+@deftypefun double gsl_cdf_negative_binomial_P (unsigned int @var{k}, double @var{p}, double @var{n})
+@deftypefunx double gsl_cdf_negative_binomial_Q (unsigned int @var{k}, double @var{p}, double @var{n})
+These functions compute the cumulative distribution functions
+@math{P(k)}, @math{Q(k)} for the negative binomial distribution with
+parameters @var{p} and @var{n}.
+@end deftypefun
+
+@page
+@node The Pascal Distribution
+@section The Pascal Distribution
+
+@deftypefun {unsigned int} gsl_ran_pascal (const gsl_rng * @var{r}, double @var{p}, unsigned int @var{n})
+This function returns a random integer from the Pascal distribution. The
+Pascal distribution is simply a negative binomial distribution with an
+integer value of @math{n}.
+@tex
+\beforedisplay
+$$
+p(k) = {(n + k - 1)! \over k! (n - 1)! } p^n (1-p)^k
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(k) = @{(n + k - 1)! \over k! (n - 1)! @} p^n (1-p)^k
+@end example
+
+@end ifinfo
+@noindent
+for @c{$k \ge 0$}
+@math{k >= 0}
+@end deftypefun
+
+@deftypefun double gsl_ran_pascal_pdf (unsigned int @var{k}, double @var{p}, unsigned int @var{n})
+This function computes the probability @math{p(k)} of obtaining @var{k}
+from a Pascal distribution with parameters @var{p} and
+@var{n}, using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-pascal.tex}
+@end tex
+
+@deftypefun double gsl_cdf_pascal_P (unsigned int @var{k}, double @var{p}, unsigned int @var{n})
+@deftypefunx double gsl_cdf_pascal_Q (unsigned int @var{k}, double @var{p}, unsigned int @var{n})
+These functions compute the cumulative distribution functions
+@math{P(k)}, @math{Q(k)} for the Pascal distribution with
+parameters @var{p} and @var{n}.
+@end deftypefun
+
+@page
+@node The Geometric Distribution
+@section The Geometric Distribution
+@deftypefun {unsigned int} gsl_ran_geometric (const gsl_rng * @var{r}, double @var{p})
+@cindex Geometric random variates
+This function returns a random integer from the geometric distribution,
+the number of independent trials with probability @var{p} until the
+first success. The probability distribution for geometric variates
+is,
+@tex
+\beforedisplay
+$$
+p(k) = p (1-p)^{k-1}
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(k) = p (1-p)^(k-1)
+@end example
+
+@end ifinfo
+@noindent
+for @c{$k \ge 1$}
+@math{k >= 1}. Note that the distribution begins with @math{k=1} with this
+definition. There is another convention in which the exponent @math{k-1}
+is replaced by @math{k}.
+@end deftypefun
+
+@deftypefun double gsl_ran_geometric_pdf (unsigned int @var{k}, double @var{p})
+This function computes the probability @math{p(k)} of obtaining @var{k}
+from a geometric distribution with probability parameter @var{p}, using
+the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-geometric.tex}
+@end tex
+
+@deftypefun double gsl_cdf_geometric_P (unsigned int @var{k}, double @var{p})
+@deftypefunx double gsl_cdf_geometric_Q (unsigned int @var{k}, double @var{p})
+These functions compute the cumulative distribution functions
+@math{P(k)}, @math{Q(k)} for the geometric distribution with parameter
+@var{p}.
+@end deftypefun
+
+
+@page
+@node The Hypergeometric Distribution
+@section The Hypergeometric Distribution
+@cindex hypergeometric random variates
+@deftypefun {unsigned int} gsl_ran_hypergeometric (const gsl_rng * @var{r}, unsigned int @var{n1}, unsigned int @var{n2}, unsigned int @var{t})
+@cindex Geometric random variates
+This function returns a random integer from the hypergeometric
+distribution. The probability distribution for hypergeometric
+random variates is,
+@tex
+\beforedisplay
+$$
+p(k) = C(n_1, k) C(n_2, t - k) / C(n_1 + n_2, t)
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(k) = C(n_1, k) C(n_2, t - k) / C(n_1 + n_2, t)
+@end example
+
+@end ifinfo
+@noindent
+where @math{C(a,b) = a!/(b!(a-b)!)} and
+@c{$t \leq n_1 + n_2$}
+@math{t <= n_1 + n_2}. The domain of @math{k} is
+@c{$\hbox{max}(0,t-n_2), \ldots, \hbox{min}(t,n_1)$}
+@math{max(0,t-n_2), ..., min(t,n_1)}.
+
+If a population contains @math{n_1} elements of ``type 1'' and
+@math{n_2} elements of ``type 2'' then the hypergeometric
+distribution gives the probability of obtaining @math{k} elements of
+``type 1'' in @math{t} samples from the population without
+replacement.
+@end deftypefun
+
+@deftypefun double gsl_ran_hypergeometric_pdf (unsigned int @var{k}, unsigned int @var{n1}, unsigned int @var{n2}, unsigned int @var{t})
+This function computes the probability @math{p(k)} of obtaining @var{k}
+from a hypergeometric distribution with parameters @var{n1}, @var{n2},
+@var{t}, using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-hypergeometric.tex}
+@end tex
+
+@deftypefun double gsl_cdf_hypergeometric_P (unsigned int @var{k}, unsigned int @var{n1}, unsigned int @var{n2}, unsigned int @var{t})
+@deftypefunx double gsl_cdf_hypergeometric_Q (unsigned int @var{k}, unsigned int @var{n1}, unsigned int @var{n2}, unsigned int @var{t})
+These functions compute the cumulative distribution functions
+@math{P(k)}, @math{Q(k)} for the hypergeometric distribution with
+parameters @var{n1}, @var{n2} and @var{t}.
+@end deftypefun
+
+
+@page
+@node The Logarithmic Distribution
+@section The Logarithmic Distribution
+@deftypefun {unsigned int} gsl_ran_logarithmic (const gsl_rng * @var{r}, double @var{p})
+@cindex Logarithmic random variates
+This function returns a random integer from the logarithmic
+distribution. The probability distribution for logarithmic random variates
+is,
+@tex
+\beforedisplay
+$$
+p(k) = {-1 \over \log(1-p)} {\left( p^k \over k \right)}
+$$
+\afterdisplay
+@end tex
+@ifinfo
+
+@example
+p(k) = @{-1 \over \log(1-p)@} @{(p^k \over k)@}
+@end example
+
+@end ifinfo
+@noindent
+for @c{$k \ge 1$}
+@math{k >= 1}.
+@end deftypefun
+
+@deftypefun double gsl_ran_logarithmic_pdf (unsigned int @var{k}, double @var{p})
+This function computes the probability @math{p(k)} of obtaining @var{k}
+from a logarithmic distribution with probability parameter @var{p},
+using the formula given above.
+@end deftypefun
+
+@sp 1
+@tex
+\centerline{\input rand-logarithmic.tex}
+@end tex
+
+@page
+@node Shuffling and Sampling
+@section Shuffling and Sampling
+
+The following functions allow the shuffling and sampling of a set of
+objects. The algorithms rely on a random number generator as a source of
+randomness and a poor quality generator can lead to correlations in the
+output. In particular it is important to avoid generators with a short
+period. For more information see Knuth, v2, 3rd ed, Section 3.4.2,
+``Random Sampling and Shuffling''.
+
+@deftypefun void gsl_ran_shuffle (const gsl_rng * @var{r}, void * @var{base}, size_t @var{n}, size_t @var{size})
+
+This function randomly shuffles the order of @var{n} objects, each of
+size @var{size}, stored in the array @var{base}[0..@var{n}-1]. The
+output of the random number generator @var{r} is used to produce the
+permutation. The algorithm generates all possible @math{n!}
+permutations with equal probability, assuming a perfect source of random
+numbers.
+
+The following code shows how to shuffle the numbers from 0 to 51,
+
+@example
+int a[52];
+
+for (i = 0; i < 52; i++)
+ @{
+ a[i] = i;
+ @}
+
+gsl_ran_shuffle (r, a, 52, sizeof (int));
+@end example
+
+@end deftypefun
+
+@deftypefun int gsl_ran_choose (const gsl_rng * @var{r}, void * @var{dest}, size_t @var{k}, void * @var{src}, size_t @var{n}, size_t @var{size})
+This function fills the array @var{dest}[k] with @var{k} objects taken
+randomly from the @var{n} elements of the array
+@var{src}[0..@var{n}-1]. The objects are each of size @var{size}. The
+output of the random number generator @var{r} is used to make the
+selection. The algorithm ensures all possible samples are equally
+likely, assuming a perfect source of randomness.
+
+The objects are sampled @emph{without} replacement, thus each object can
+only appear once in @var{dest}[k]. It is required that @var{k} be less
+than or equal to @code{n}. The objects in @var{dest} will be in the
+same relative order as those in @var{src}. You will need to call
+@code{gsl_ran_shuffle(r, dest, n, size)} if you want to randomize the
+order.
+
+The following code shows how to select a random sample of three unique
+numbers from the set 0 to 99,
+
+@example
+double a[3], b[100];
+
+for (i = 0; i < 100; i++)
+ @{
+ b[i] = (double) i;
+ @}
+
+gsl_ran_choose (r, a, 3, b, 100, sizeof (double));
+@end example
+
+@end deftypefun
+
+@deftypefun void gsl_ran_sample (const gsl_rng * @var{r}, void * @var{dest}, size_t @var{k}, void * @var{src}, size_t @var{n}, size_t @var{size})
+This function is like @code{gsl_ran_choose} but samples @var{k} items
+from the original array of @var{n} items @var{src} with replacement, so
+the same object can appear more than once in the output sequence
+@var{dest}. There is no requirement that @var{k} be less than @var{n}
+in this case.
+@end deftypefun
+
+
+@node Random Number Distribution Examples
+@section Examples
+
+The following program demonstrates the use of a random number generator
+to produce variates from a distribution. It prints 10 samples from the
+Poisson distribution with a mean of 3.
+
+@example
+@verbatiminclude examples/randpoisson.c
+@end example
+
+@noindent
+If the library and header files are installed under @file{/usr/local}
+(the default location) then the program can be compiled with these
+options,
+
+@example
+$ gcc -Wall demo.c -lgsl -lgslcblas -lm
+@end example
+
+@noindent
+Here is the output of the program,
+
+@example
+$ ./a.out
+@verbatiminclude examples/randpoisson.out
+@end example
+
+@noindent
+The variates depend on the seed used by the generator. The seed for the
+default generator type @code{gsl_rng_default} can be changed with the
+@code{GSL_RNG_SEED} environment variable to produce a different stream
+of variates,
+
+@example
+$ GSL_RNG_SEED=123 ./a.out
+@verbatiminclude examples/randpoisson.2.out
+@end example
+
+@noindent
+The following program generates a random walk in two dimensions.
+
+@example
+@verbatiminclude examples/randwalk.c
+@end example
+
+@noindent
+Here is the output from the program, three 10-step random walks from the origin,
+
+@tex
+\centerline{\input random-walk.tex}
+@end tex
+
+The following program computes the upper and lower cumulative
+distribution functions for the standard normal distribution at
+@math{x=2}.
+
+@example
+@verbatiminclude examples/cdf.c
+@end example
+
+@noindent
+Here is the output of the program,
+
+@example
+@verbatiminclude examples/cdf.out
+@end example
+
+@node Random Number Distribution References and Further Reading
+@section References and Further Reading
+
+For an encyclopaedic coverage of the subject readers are advised to
+consult the book @cite{Non-Uniform Random Variate Generation} by Luc
+Devroye. It covers every imaginable distribution and provides hundreds
+of algorithms.
+
+@itemize @asis
+@item
+Luc Devroye, @cite{Non-Uniform Random Variate Generation},
+Springer-Verlag, ISBN 0-387-96305-7.
+@end itemize
+
+@noindent
+The subject of random variate generation is also reviewed by Knuth, who
+describes algorithms for all the major distributions.
+
+@itemize @asis
+@item
+Donald E. Knuth, @cite{The Art of Computer Programming: Seminumerical
+Algorithms} (Vol 2, 3rd Ed, 1997), Addison-Wesley, ISBN 0201896842.
+@end itemize
+
+@noindent
+The Particle Data Group provides a short review of techniques for
+generating distributions of random numbers in the ``Monte Carlo''
+section of its Annual Review of Particle Physics.
+
+@itemize @asis
+@item
+@cite{Review of Particle Properties}
+R.M. Barnett et al., Physical Review D54, 1 (1996)
+@uref{http://pdg.lbl.gov/}.
+@end itemize
+
+@noindent
+The Review of Particle Physics is available online in postscript and pdf
+format.
+
+@noindent
+An overview of methods used to compute cumulative distribution functions
+can be found in @cite{Statistical Computing} by W.J. Kennedy and
+J.E. Gentle. Another general reference is @cite{Elements of Statistical
+Computing} by R.A. Thisted.
+
+@itemize @asis
+@item
+William E. Kennedy and James E. Gentle, @cite{Statistical Computing} (1980),
+Marcel Dekker, ISBN 0-8247-6898-1.
+@end itemize
+
+@itemize @asis
+@item
+Ronald A. Thisted, @cite{Elements of Statistical Computing} (1988),
+Chapman & Hall, ISBN 0-412-01371-1.
+@end itemize
+
+@noindent
+The cumulative distribution functions for the Gaussian distribution
+are based on the following papers,
+
+@itemize @asis
+@item
+@cite{Rational Chebyshev Approximations Using Linear Equations},
+W.J. Cody, W. Fraser, J.F. Hart. Numerische Mathematik 12, 242--251 (1968).
+@end itemize
+
+@itemize @asis
+@item
+@cite{Rational Chebyshev Approximations for the Error Function},
+W.J. Cody. Mathematics of Computation 23, n107, 631--637 (July 1969).
+@end itemize