rb-gsl 1.15.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (660) hide show
  1. checksums.yaml +7 -0
  2. data/AUTHORS +6 -0
  3. data/COPYING +339 -0
  4. data/ChangeLog +567 -0
  5. data/README +32 -0
  6. data/Rakefile +99 -0
  7. data/THANKS +17 -0
  8. data/VERSION +1 -0
  9. data/examples/alf/alf.gp +15 -0
  10. data/examples/alf/alf.rb +32 -0
  11. data/examples/blas/blas.rb +13 -0
  12. data/examples/blas/dnrm2.rb +16 -0
  13. data/examples/blas/level1.rb +81 -0
  14. data/examples/blas/level2.rb +11 -0
  15. data/examples/blas/level3.rb +12 -0
  16. data/examples/bspline.rb +57 -0
  17. data/examples/cdf.rb +16 -0
  18. data/examples/cheb.rb +21 -0
  19. data/examples/combination.rb +23 -0
  20. data/examples/complex/RC-lpf.rb +47 -0
  21. data/examples/complex/add.rb +36 -0
  22. data/examples/complex/coerce.rb +14 -0
  23. data/examples/complex/complex.rb +25 -0
  24. data/examples/complex/fpmi.rb +70 -0
  25. data/examples/complex/functions.rb +77 -0
  26. data/examples/complex/michelson.rb +36 -0
  27. data/examples/complex/mul.rb +28 -0
  28. data/examples/complex/oscillator.rb +17 -0
  29. data/examples/complex/set.rb +37 -0
  30. data/examples/const/physconst.rb +151 -0
  31. data/examples/const/travel.rb +45 -0
  32. data/examples/deriv/demo.rb +13 -0
  33. data/examples/deriv/deriv.rb +36 -0
  34. data/examples/deriv/diff.rb +35 -0
  35. data/examples/dht.rb +42 -0
  36. data/examples/dirac.rb +56 -0
  37. data/examples/eigen/eigen.rb +34 -0
  38. data/examples/eigen/herm.rb +22 -0
  39. data/examples/eigen/narray.rb +9 -0
  40. data/examples/eigen/nonsymm.rb +37 -0
  41. data/examples/eigen/nonsymmv.rb +43 -0
  42. data/examples/eigen/qhoscillator.gp +35 -0
  43. data/examples/eigen/qhoscillator.rb +90 -0
  44. data/examples/eigen/vander.rb +41 -0
  45. data/examples/fft/fft.rb +17 -0
  46. data/examples/fft/fft2.rb +17 -0
  47. data/examples/fft/forward.rb +25 -0
  48. data/examples/fft/forward2.rb +26 -0
  49. data/examples/fft/radix2.rb +18 -0
  50. data/examples/fft/real-halfcomplex.rb +33 -0
  51. data/examples/fft/real-halfcomplex2.rb +30 -0
  52. data/examples/fft/realradix2.rb +19 -0
  53. data/examples/fft/sunspot.dat +256 -0
  54. data/examples/fft/sunspot.rb +16 -0
  55. data/examples/fit/expdata.dat +20 -0
  56. data/examples/fit/expfit.rb +31 -0
  57. data/examples/fit/gaussfit.rb +29 -0
  58. data/examples/fit/gaussian_2peaks.rb +34 -0
  59. data/examples/fit/hillfit.rb +40 -0
  60. data/examples/fit/lognormal.rb +26 -0
  61. data/examples/fit/lorentzfit.rb +22 -0
  62. data/examples/fit/multifit.rb +72 -0
  63. data/examples/fit/ndlinear.rb +133 -0
  64. data/examples/fit/nonlinearfit.rb +89 -0
  65. data/examples/fit/plot.gp +36 -0
  66. data/examples/fit/polyfit.rb +9 -0
  67. data/examples/fit/powerfit.rb +21 -0
  68. data/examples/fit/sigmoidfit.rb +40 -0
  69. data/examples/fit/sinfit.rb +22 -0
  70. data/examples/fit/wlinear.rb +46 -0
  71. data/examples/fresnel.rb +11 -0
  72. data/examples/function/function.rb +36 -0
  73. data/examples/function/log.rb +7 -0
  74. data/examples/function/min.rb +33 -0
  75. data/examples/function/sin.rb +10 -0
  76. data/examples/function/synchrotron.rb +18 -0
  77. data/examples/gallery/butterfly.rb +7 -0
  78. data/examples/gallery/cayley.rb +12 -0
  79. data/examples/gallery/cornu.rb +23 -0
  80. data/examples/gallery/eight.rb +11 -0
  81. data/examples/gallery/koch.rb +40 -0
  82. data/examples/gallery/lemniscate.rb +11 -0
  83. data/examples/gallery/polar.rb +11 -0
  84. data/examples/gallery/rgplot/cossin.rb +35 -0
  85. data/examples/gallery/rgplot/rgplot.replaced +0 -0
  86. data/examples/gallery/rgplot/roesller.rb +55 -0
  87. data/examples/gallery/roesller.rb +39 -0
  88. data/examples/gallery/scarabaeus.rb +14 -0
  89. data/examples/histogram/cauchy.rb +27 -0
  90. data/examples/histogram/cauchy.sh +2 -0
  91. data/examples/histogram/exponential.rb +19 -0
  92. data/examples/histogram/gauss.rb +16 -0
  93. data/examples/histogram/gsl-histogram.rb +40 -0
  94. data/examples/histogram/histo2d.rb +31 -0
  95. data/examples/histogram/histo3d.rb +34 -0
  96. data/examples/histogram/histogram-pdf.rb +27 -0
  97. data/examples/histogram/histogram.rb +26 -0
  98. data/examples/histogram/integral.rb +28 -0
  99. data/examples/histogram/poisson.rb +27 -0
  100. data/examples/histogram/power.rb +25 -0
  101. data/examples/histogram/rebin.rb +17 -0
  102. data/examples/histogram/smp.dat +5 -0
  103. data/examples/histogram/xexp.rb +21 -0
  104. data/examples/integration/ahmed.rb +21 -0
  105. data/examples/integration/cosmology.rb +75 -0
  106. data/examples/integration/friedmann.gp +16 -0
  107. data/examples/integration/friedmann.rb +35 -0
  108. data/examples/integration/gamma-zeta.rb +35 -0
  109. data/examples/integration/integration.rb +22 -0
  110. data/examples/integration/qag.rb +8 -0
  111. data/examples/integration/qag2.rb +14 -0
  112. data/examples/integration/qag3.rb +8 -0
  113. data/examples/integration/qagi.rb +28 -0
  114. data/examples/integration/qagi2.rb +49 -0
  115. data/examples/integration/qagiu.rb +29 -0
  116. data/examples/integration/qagp.rb +20 -0
  117. data/examples/integration/qags.rb +14 -0
  118. data/examples/integration/qawc.rb +18 -0
  119. data/examples/integration/qawf.rb +41 -0
  120. data/examples/integration/qawo.rb +29 -0
  121. data/examples/integration/qaws.rb +30 -0
  122. data/examples/integration/qng.rb +17 -0
  123. data/examples/interp/demo.gp +20 -0
  124. data/examples/interp/demo.rb +45 -0
  125. data/examples/interp/interp.rb +37 -0
  126. data/examples/interp/points +10 -0
  127. data/examples/interp/spline.rb +20 -0
  128. data/examples/jacobi/deriv.rb +40 -0
  129. data/examples/jacobi/integrate.rb +34 -0
  130. data/examples/jacobi/interp.rb +43 -0
  131. data/examples/jacobi/jacobi.rb +11 -0
  132. data/examples/linalg/HH.rb +15 -0
  133. data/examples/linalg/HH_narray.rb +13 -0
  134. data/examples/linalg/LQ_solve.rb +73 -0
  135. data/examples/linalg/LU.rb +84 -0
  136. data/examples/linalg/LU2.rb +31 -0
  137. data/examples/linalg/LU_narray.rb +24 -0
  138. data/examples/linalg/PTLQ.rb +47 -0
  139. data/examples/linalg/QR.rb +18 -0
  140. data/examples/linalg/QRPT.rb +47 -0
  141. data/examples/linalg/QR_solve.rb +78 -0
  142. data/examples/linalg/QR_solve_narray.rb +13 -0
  143. data/examples/linalg/SV.rb +16 -0
  144. data/examples/linalg/SV_narray.rb +12 -0
  145. data/examples/linalg/SV_solve.rb +49 -0
  146. data/examples/linalg/chol.rb +29 -0
  147. data/examples/linalg/chol_narray.rb +15 -0
  148. data/examples/linalg/complex.rb +57 -0
  149. data/examples/linalg/invert_narray.rb +10 -0
  150. data/examples/math/const.rb +67 -0
  151. data/examples/math/elementary.rb +35 -0
  152. data/examples/math/functions.rb +41 -0
  153. data/examples/math/inf_nan.rb +34 -0
  154. data/examples/math/minmax.rb +22 -0
  155. data/examples/math/power.rb +18 -0
  156. data/examples/math/test.rb +31 -0
  157. data/examples/matrix/a.dat +0 -0
  158. data/examples/matrix/add.rb +45 -0
  159. data/examples/matrix/b.dat +4 -0
  160. data/examples/matrix/cat.rb +31 -0
  161. data/examples/matrix/colvectors.rb +24 -0
  162. data/examples/matrix/complex.rb +41 -0
  163. data/examples/matrix/det.rb +29 -0
  164. data/examples/matrix/diagonal.rb +23 -0
  165. data/examples/matrix/get_all.rb +159 -0
  166. data/examples/matrix/hilbert.rb +31 -0
  167. data/examples/matrix/iterator.rb +19 -0
  168. data/examples/matrix/matrix.rb +57 -0
  169. data/examples/matrix/minmax.rb +53 -0
  170. data/examples/matrix/mul.rb +39 -0
  171. data/examples/matrix/rand.rb +20 -0
  172. data/examples/matrix/read.rb +29 -0
  173. data/examples/matrix/rowcol.rb +47 -0
  174. data/examples/matrix/set.rb +41 -0
  175. data/examples/matrix/set_all.rb +100 -0
  176. data/examples/matrix/view.rb +32 -0
  177. data/examples/matrix/view_all.rb +148 -0
  178. data/examples/matrix/write.rb +23 -0
  179. data/examples/min.rb +29 -0
  180. data/examples/monte/miser.rb +47 -0
  181. data/examples/monte/monte.rb +47 -0
  182. data/examples/monte/plain.rb +47 -0
  183. data/examples/monte/vegas.rb +46 -0
  184. data/examples/multimin/bundle.rb +66 -0
  185. data/examples/multimin/cqp.rb +109 -0
  186. data/examples/multimin/fdfminimizer.rb +40 -0
  187. data/examples/multimin/fminimizer.rb +41 -0
  188. data/examples/multiroot/demo.rb +36 -0
  189. data/examples/multiroot/fdfsolver.rb +50 -0
  190. data/examples/multiroot/fsolver.rb +33 -0
  191. data/examples/multiroot/fsolver2.rb +32 -0
  192. data/examples/multiroot/fsolver3.rb +26 -0
  193. data/examples/narray/histogram.rb +14 -0
  194. data/examples/narray/mandel.rb +27 -0
  195. data/examples/narray/narray.rb +28 -0
  196. data/examples/narray/narray2.rb +44 -0
  197. data/examples/narray/sf.rb +26 -0
  198. data/examples/ntuple/create.rb +17 -0
  199. data/examples/ntuple/project.rb +31 -0
  200. data/examples/odeiv/binarysystem.gp +23 -0
  201. data/examples/odeiv/binarysystem.rb +104 -0
  202. data/examples/odeiv/demo.gp +24 -0
  203. data/examples/odeiv/demo.rb +69 -0
  204. data/examples/odeiv/demo2.gp +26 -0
  205. data/examples/odeiv/duffing.rb +45 -0
  206. data/examples/odeiv/frei1.rb +109 -0
  207. data/examples/odeiv/frei2.rb +76 -0
  208. data/examples/odeiv/legendre.rb +52 -0
  209. data/examples/odeiv/odeiv.rb +32 -0
  210. data/examples/odeiv/odeiv2.rb +45 -0
  211. data/examples/odeiv/oscillator.rb +42 -0
  212. data/examples/odeiv/sedov.rb +97 -0
  213. data/examples/odeiv/whitedwarf.gp +40 -0
  214. data/examples/odeiv/whitedwarf.rb +158 -0
  215. data/examples/ool/conmin.rb +100 -0
  216. data/examples/ool/gencan.rb +99 -0
  217. data/examples/ool/pgrad.rb +100 -0
  218. data/examples/ool/spg.rb +100 -0
  219. data/examples/pdf/bernoulli.rb +5 -0
  220. data/examples/pdf/beta.rb +7 -0
  221. data/examples/pdf/binomiral.rb +10 -0
  222. data/examples/pdf/cauchy.rb +6 -0
  223. data/examples/pdf/chisq.rb +8 -0
  224. data/examples/pdf/exponential.rb +7 -0
  225. data/examples/pdf/exppow.rb +6 -0
  226. data/examples/pdf/fdist.rb +7 -0
  227. data/examples/pdf/flat.rb +7 -0
  228. data/examples/pdf/gamma.rb +8 -0
  229. data/examples/pdf/gauss-tail.rb +5 -0
  230. data/examples/pdf/gauss.rb +6 -0
  231. data/examples/pdf/geometric.rb +5 -0
  232. data/examples/pdf/gumbel.rb +6 -0
  233. data/examples/pdf/hypergeometric.rb +11 -0
  234. data/examples/pdf/landau.rb +5 -0
  235. data/examples/pdf/laplace.rb +7 -0
  236. data/examples/pdf/logarithmic.rb +5 -0
  237. data/examples/pdf/logistic.rb +6 -0
  238. data/examples/pdf/lognormal.rb +6 -0
  239. data/examples/pdf/neg-binomiral.rb +10 -0
  240. data/examples/pdf/pareto.rb +7 -0
  241. data/examples/pdf/pascal.rb +10 -0
  242. data/examples/pdf/poisson.rb +5 -0
  243. data/examples/pdf/rayleigh-tail.rb +6 -0
  244. data/examples/pdf/rayleigh.rb +6 -0
  245. data/examples/pdf/tdist.rb +6 -0
  246. data/examples/pdf/weibull.rb +8 -0
  247. data/examples/permutation/ex1.rb +22 -0
  248. data/examples/permutation/permutation.rb +16 -0
  249. data/examples/poly/bell.rb +6 -0
  250. data/examples/poly/bessel.rb +6 -0
  251. data/examples/poly/cheb.rb +6 -0
  252. data/examples/poly/cheb_II.rb +6 -0
  253. data/examples/poly/cubic.rb +9 -0
  254. data/examples/poly/demo.rb +20 -0
  255. data/examples/poly/eval.rb +28 -0
  256. data/examples/poly/eval_derivs.rb +14 -0
  257. data/examples/poly/fit.rb +21 -0
  258. data/examples/poly/hermite.rb +6 -0
  259. data/examples/poly/poly.rb +13 -0
  260. data/examples/poly/quadratic.rb +25 -0
  261. data/examples/random/diffusion.rb +34 -0
  262. data/examples/random/gaussian.rb +9 -0
  263. data/examples/random/generator.rb +27 -0
  264. data/examples/random/hdsobol.rb +21 -0
  265. data/examples/random/poisson.rb +9 -0
  266. data/examples/random/qrng.rb +19 -0
  267. data/examples/random/randomwalk.rb +37 -0
  268. data/examples/random/randomwalk2d.rb +19 -0
  269. data/examples/random/rayleigh.rb +36 -0
  270. data/examples/random/rng.rb +33 -0
  271. data/examples/random/rngextra.rb +14 -0
  272. data/examples/roots/bisection.rb +25 -0
  273. data/examples/roots/brent.rb +43 -0
  274. data/examples/roots/demo.rb +30 -0
  275. data/examples/roots/newton.rb +46 -0
  276. data/examples/roots/recombination.gp +12 -0
  277. data/examples/roots/recombination.rb +61 -0
  278. data/examples/roots/steffenson.rb +48 -0
  279. data/examples/sf/ShiChi.rb +6 -0
  280. data/examples/sf/SiCi.rb +6 -0
  281. data/examples/sf/airy_Ai.rb +8 -0
  282. data/examples/sf/airy_Bi.rb +8 -0
  283. data/examples/sf/bessel_IK.rb +12 -0
  284. data/examples/sf/bessel_JY.rb +13 -0
  285. data/examples/sf/beta_inc.rb +9 -0
  286. data/examples/sf/clausen.rb +6 -0
  287. data/examples/sf/dawson.rb +5 -0
  288. data/examples/sf/debye.rb +9 -0
  289. data/examples/sf/dilog.rb +6 -0
  290. data/examples/sf/ellint.rb +6 -0
  291. data/examples/sf/expint.rb +8 -0
  292. data/examples/sf/fermi.rb +10 -0
  293. data/examples/sf/gamma_inc_P.rb +9 -0
  294. data/examples/sf/gegenbauer.rb +8 -0
  295. data/examples/sf/hyperg.rb +7 -0
  296. data/examples/sf/laguerre.rb +19 -0
  297. data/examples/sf/lambertW.rb +5 -0
  298. data/examples/sf/legendre_P.rb +10 -0
  299. data/examples/sf/lngamma.rb +5 -0
  300. data/examples/sf/psi.rb +54 -0
  301. data/examples/sf/sphbessel.gp +27 -0
  302. data/examples/sf/sphbessel.rb +30 -0
  303. data/examples/sf/synchrotron.rb +5 -0
  304. data/examples/sf/transport.rb +10 -0
  305. data/examples/sf/zetam1.rb +5 -0
  306. data/examples/siman.rb +44 -0
  307. data/examples/sort/heapsort.rb +23 -0
  308. data/examples/sort/heapsort_vector_complex.rb +21 -0
  309. data/examples/sort/sort.rb +23 -0
  310. data/examples/sort/sort2.rb +16 -0
  311. data/examples/stats/mean.rb +17 -0
  312. data/examples/stats/statistics.rb +18 -0
  313. data/examples/stats/test.rb +9 -0
  314. data/examples/sum.rb +34 -0
  315. data/examples/tamu_anova.rb +18 -0
  316. data/examples/vector/a.dat +0 -0
  317. data/examples/vector/add.rb +56 -0
  318. data/examples/vector/b.dat +4 -0
  319. data/examples/vector/c.dat +3 -0
  320. data/examples/vector/collect.rb +26 -0
  321. data/examples/vector/compare.rb +28 -0
  322. data/examples/vector/complex.rb +51 -0
  323. data/examples/vector/complex_get_all.rb +85 -0
  324. data/examples/vector/complex_set_all.rb +131 -0
  325. data/examples/vector/complex_view_all.rb +77 -0
  326. data/examples/vector/connect.rb +22 -0
  327. data/examples/vector/decimate.rb +38 -0
  328. data/examples/vector/diff.rb +31 -0
  329. data/examples/vector/filescan.rb +17 -0
  330. data/examples/vector/floor.rb +23 -0
  331. data/examples/vector/get_all.rb +82 -0
  332. data/examples/vector/gnuplot.rb +38 -0
  333. data/examples/vector/graph.rb +28 -0
  334. data/examples/vector/histogram.rb +22 -0
  335. data/examples/vector/linspace.rb +24 -0
  336. data/examples/vector/log.rb +17 -0
  337. data/examples/vector/logic.rb +33 -0
  338. data/examples/vector/logspace.rb +25 -0
  339. data/examples/vector/minmax.rb +47 -0
  340. data/examples/vector/mul.rb +49 -0
  341. data/examples/vector/narray.rb +46 -0
  342. data/examples/vector/read.rb +29 -0
  343. data/examples/vector/set.rb +35 -0
  344. data/examples/vector/set_all.rb +121 -0
  345. data/examples/vector/smpv.dat +15 -0
  346. data/examples/vector/test.rb +43 -0
  347. data/examples/vector/test_gslblock.rb +58 -0
  348. data/examples/vector/vector.rb +110 -0
  349. data/examples/vector/view.rb +35 -0
  350. data/examples/vector/view_all.rb +73 -0
  351. data/examples/vector/where.rb +29 -0
  352. data/examples/vector/write.rb +24 -0
  353. data/examples/vector/zip.rb +34 -0
  354. data/examples/wavelet/ecg.dat +256 -0
  355. data/examples/wavelet/wavelet1.rb +50 -0
  356. data/ext/alf.c +206 -0
  357. data/ext/array.c +642 -0
  358. data/ext/array_complex.c +248 -0
  359. data/ext/blas.c +29 -0
  360. data/ext/blas1.c +734 -0
  361. data/ext/blas2.c +1093 -0
  362. data/ext/blas3.c +881 -0
  363. data/ext/block.c +44 -0
  364. data/ext/block_source.c +887 -0
  365. data/ext/bspline.c +130 -0
  366. data/ext/bundle.c +3 -0
  367. data/ext/cdf.c +754 -0
  368. data/ext/cheb.c +542 -0
  369. data/ext/combination.c +283 -0
  370. data/ext/common.c +325 -0
  371. data/ext/complex.c +1004 -0
  372. data/ext/const.c +673 -0
  373. data/ext/const_additional.c +120 -0
  374. data/ext/cqp.c +283 -0
  375. data/ext/deriv.c +195 -0
  376. data/ext/dht.c +361 -0
  377. data/ext/diff.c +166 -0
  378. data/ext/dirac.c +389 -0
  379. data/ext/eigen.c +2373 -0
  380. data/ext/error.c +193 -0
  381. data/ext/extconf.rb +303 -0
  382. data/ext/fcmp.c +66 -0
  383. data/ext/fft.c +1102 -0
  384. data/ext/fit.c +205 -0
  385. data/ext/fresnel.c +312 -0
  386. data/ext/function.c +524 -0
  387. data/ext/geometry.c +139 -0
  388. data/ext/graph.c +1640 -0
  389. data/ext/gsl.c +280 -0
  390. data/ext/gsl_narray.c +804 -0
  391. data/ext/histogram.c +1991 -0
  392. data/ext/histogram2d.c +1068 -0
  393. data/ext/histogram3d.c +884 -0
  394. data/ext/histogram3d_source.c +750 -0
  395. data/ext/histogram_find.c +101 -0
  396. data/ext/histogram_oper.c +159 -0
  397. data/ext/ieee.c +100 -0
  398. data/ext/integration.c +1179 -0
  399. data/ext/interp.c +512 -0
  400. data/ext/jacobi.c +739 -0
  401. data/ext/linalg.c +4042 -0
  402. data/ext/linalg_complex.c +739 -0
  403. data/ext/math.c +725 -0
  404. data/ext/matrix.c +39 -0
  405. data/ext/matrix_complex.c +1737 -0
  406. data/ext/matrix_double.c +560 -0
  407. data/ext/matrix_int.c +256 -0
  408. data/ext/matrix_source.c +2734 -0
  409. data/ext/min.c +250 -0
  410. data/ext/monte.c +992 -0
  411. data/ext/multifit.c +1871 -0
  412. data/ext/multimin.c +806 -0
  413. data/ext/multimin_fsdf.c +156 -0
  414. data/ext/multiroots.c +955 -0
  415. data/ext/multiset.c +214 -0
  416. data/ext/ndlinear.c +321 -0
  417. data/ext/nmf.c +171 -0
  418. data/ext/nmf_wrap.c +75 -0
  419. data/ext/ntuple.c +469 -0
  420. data/ext/odeiv.c +962 -0
  421. data/ext/ool.c +879 -0
  422. data/ext/oper_complex_source.c +253 -0
  423. data/ext/permutation.c +596 -0
  424. data/ext/poly.c +42 -0
  425. data/ext/poly2.c +265 -0
  426. data/ext/poly_source.c +1915 -0
  427. data/ext/qrng.c +171 -0
  428. data/ext/randist.c +1873 -0
  429. data/ext/rational.c +480 -0
  430. data/ext/rng.c +612 -0
  431. data/ext/root.c +408 -0
  432. data/ext/sf.c +1494 -0
  433. data/ext/sf_airy.c +200 -0
  434. data/ext/sf_bessel.c +871 -0
  435. data/ext/sf_clausen.c +28 -0
  436. data/ext/sf_coulomb.c +206 -0
  437. data/ext/sf_coupling.c +121 -0
  438. data/ext/sf_dawson.c +29 -0
  439. data/ext/sf_debye.c +157 -0
  440. data/ext/sf_dilog.c +43 -0
  441. data/ext/sf_elementary.c +46 -0
  442. data/ext/sf_ellint.c +206 -0
  443. data/ext/sf_elljac.c +30 -0
  444. data/ext/sf_erfc.c +93 -0
  445. data/ext/sf_exp.c +169 -0
  446. data/ext/sf_expint.c +211 -0
  447. data/ext/sf_fermi_dirac.c +148 -0
  448. data/ext/sf_gamma.c +347 -0
  449. data/ext/sf_gegenbauer.c +97 -0
  450. data/ext/sf_hyperg.c +203 -0
  451. data/ext/sf_laguerre.c +113 -0
  452. data/ext/sf_lambert.c +47 -0
  453. data/ext/sf_legendre.c +368 -0
  454. data/ext/sf_log.c +105 -0
  455. data/ext/sf_mathieu.c +238 -0
  456. data/ext/sf_power.c +47 -0
  457. data/ext/sf_psi.c +98 -0
  458. data/ext/sf_synchrotron.c +48 -0
  459. data/ext/sf_transport.c +76 -0
  460. data/ext/sf_trigonometric.c +210 -0
  461. data/ext/sf_zeta.c +119 -0
  462. data/ext/signal.c +308 -0
  463. data/ext/siman.c +717 -0
  464. data/ext/sort.c +208 -0
  465. data/ext/spline.c +395 -0
  466. data/ext/stats.c +800 -0
  467. data/ext/sum.c +168 -0
  468. data/ext/tamu_anova.c +56 -0
  469. data/ext/tensor.c +38 -0
  470. data/ext/tensor_source.c +1123 -0
  471. data/ext/vector.c +38 -0
  472. data/ext/vector_complex.c +2246 -0
  473. data/ext/vector_double.c +1438 -0
  474. data/ext/vector_int.c +204 -0
  475. data/ext/vector_source.c +3336 -0
  476. data/ext/wavelet.c +945 -0
  477. data/include/rb_gsl.h +158 -0
  478. data/include/rb_gsl_array.h +238 -0
  479. data/include/rb_gsl_cheb.h +21 -0
  480. data/include/rb_gsl_common.h +348 -0
  481. data/include/rb_gsl_complex.h +25 -0
  482. data/include/rb_gsl_config.h +62 -0
  483. data/include/rb_gsl_const.h +29 -0
  484. data/include/rb_gsl_dirac.h +13 -0
  485. data/include/rb_gsl_eigen.h +17 -0
  486. data/include/rb_gsl_fft.h +62 -0
  487. data/include/rb_gsl_fit.h +25 -0
  488. data/include/rb_gsl_function.h +27 -0
  489. data/include/rb_gsl_graph.h +70 -0
  490. data/include/rb_gsl_histogram.h +63 -0
  491. data/include/rb_gsl_histogram3d.h +97 -0
  492. data/include/rb_gsl_integration.h +17 -0
  493. data/include/rb_gsl_interp.h +46 -0
  494. data/include/rb_gsl_linalg.h +25 -0
  495. data/include/rb_gsl_math.h +26 -0
  496. data/include/rb_gsl_odeiv.h +21 -0
  497. data/include/rb_gsl_poly.h +71 -0
  498. data/include/rb_gsl_rational.h +37 -0
  499. data/include/rb_gsl_rng.h +21 -0
  500. data/include/rb_gsl_root.h +22 -0
  501. data/include/rb_gsl_sf.h +119 -0
  502. data/include/rb_gsl_statistics.h +17 -0
  503. data/include/rb_gsl_tensor.h +45 -0
  504. data/include/rb_gsl_with_narray.h +29 -0
  505. data/include/templates_off.h +87 -0
  506. data/include/templates_on.h +241 -0
  507. data/lib/gsl.rb +3 -0
  508. data/lib/gsl/gnuplot.rb +41 -0
  509. data/lib/gsl/oper.rb +68 -0
  510. data/lib/ool.rb +22 -0
  511. data/lib/ool/conmin.rb +30 -0
  512. data/lib/rbgsl.rb +3 -0
  513. data/rdoc/alf.rdoc +77 -0
  514. data/rdoc/blas.rdoc +269 -0
  515. data/rdoc/bspline.rdoc +42 -0
  516. data/rdoc/changes.rdoc +164 -0
  517. data/rdoc/cheb.rdoc +99 -0
  518. data/rdoc/cholesky_complex.rdoc +46 -0
  519. data/rdoc/combi.rdoc +125 -0
  520. data/rdoc/complex.rdoc +210 -0
  521. data/rdoc/const.rdoc +546 -0
  522. data/rdoc/dht.rdoc +122 -0
  523. data/rdoc/diff.rdoc +133 -0
  524. data/rdoc/ehandling.rdoc +50 -0
  525. data/rdoc/eigen.rdoc +401 -0
  526. data/rdoc/fft.rdoc +535 -0
  527. data/rdoc/fit.rdoc +284 -0
  528. data/rdoc/function.rdoc +94 -0
  529. data/rdoc/graph.rdoc +137 -0
  530. data/rdoc/hist.rdoc +409 -0
  531. data/rdoc/hist2d.rdoc +279 -0
  532. data/rdoc/hist3d.rdoc +112 -0
  533. data/rdoc/index.rdoc +62 -0
  534. data/rdoc/integration.rdoc +398 -0
  535. data/rdoc/interp.rdoc +231 -0
  536. data/rdoc/intro.rdoc +27 -0
  537. data/rdoc/linalg.rdoc +681 -0
  538. data/rdoc/linalg_complex.rdoc +88 -0
  539. data/rdoc/math.rdoc +276 -0
  540. data/rdoc/matrix.rdoc +1093 -0
  541. data/rdoc/min.rdoc +189 -0
  542. data/rdoc/monte.rdoc +234 -0
  543. data/rdoc/multimin.rdoc +312 -0
  544. data/rdoc/multiroot.rdoc +293 -0
  545. data/rdoc/narray.rdoc +177 -0
  546. data/rdoc/ndlinear.rdoc +250 -0
  547. data/rdoc/nonlinearfit.rdoc +348 -0
  548. data/rdoc/ntuple.rdoc +88 -0
  549. data/rdoc/odeiv.rdoc +378 -0
  550. data/rdoc/perm.rdoc +221 -0
  551. data/rdoc/poly.rdoc +335 -0
  552. data/rdoc/qrng.rdoc +90 -0
  553. data/rdoc/randist.rdoc +233 -0
  554. data/rdoc/ref.rdoc +93 -0
  555. data/rdoc/rng.rdoc +203 -0
  556. data/rdoc/rngextra.rdoc +11 -0
  557. data/rdoc/roots.rdoc +305 -0
  558. data/rdoc/screenshot.rdoc +40 -0
  559. data/rdoc/sf.rdoc +1622 -0
  560. data/rdoc/siman.rdoc +89 -0
  561. data/rdoc/sort.rdoc +94 -0
  562. data/rdoc/start.rdoc +16 -0
  563. data/rdoc/stats.rdoc +219 -0
  564. data/rdoc/sum.rdoc +65 -0
  565. data/rdoc/tensor.rdoc +251 -0
  566. data/rdoc/tut.rdoc +5 -0
  567. data/rdoc/use.rdoc +177 -0
  568. data/rdoc/vector.rdoc +1243 -0
  569. data/rdoc/vector_complex.rdoc +347 -0
  570. data/rdoc/wavelet.rdoc +218 -0
  571. data/setup.rb +1585 -0
  572. data/tests/blas/amax.rb +14 -0
  573. data/tests/blas/asum.rb +16 -0
  574. data/tests/blas/axpy.rb +25 -0
  575. data/tests/blas/copy.rb +23 -0
  576. data/tests/blas/dot.rb +23 -0
  577. data/tests/bspline.rb +53 -0
  578. data/tests/cdf.rb +1388 -0
  579. data/tests/cheb.rb +112 -0
  580. data/tests/combination.rb +123 -0
  581. data/tests/complex.rb +17 -0
  582. data/tests/const.rb +24 -0
  583. data/tests/deriv.rb +85 -0
  584. data/tests/dht/dht1.rb +17 -0
  585. data/tests/dht/dht2.rb +23 -0
  586. data/tests/dht/dht3.rb +23 -0
  587. data/tests/dht/dht4.rb +23 -0
  588. data/tests/diff.rb +78 -0
  589. data/tests/eigen/eigen.rb +220 -0
  590. data/tests/eigen/gen.rb +105 -0
  591. data/tests/eigen/genherm.rb +66 -0
  592. data/tests/eigen/gensymm.rb +68 -0
  593. data/tests/eigen/nonsymm.rb +53 -0
  594. data/tests/eigen/nonsymmv.rb +53 -0
  595. data/tests/eigen/symm-herm.rb +74 -0
  596. data/tests/err.rb +58 -0
  597. data/tests/fit.rb +124 -0
  598. data/tests/gsl_test.rb +118 -0
  599. data/tests/gsl_test2.rb +110 -0
  600. data/tests/histo.rb +12 -0
  601. data/tests/integration/integration1.rb +72 -0
  602. data/tests/integration/integration2.rb +71 -0
  603. data/tests/integration/integration3.rb +71 -0
  604. data/tests/integration/integration4.rb +71 -0
  605. data/tests/interp.rb +45 -0
  606. data/tests/linalg/HH.rb +64 -0
  607. data/tests/linalg/LU.rb +47 -0
  608. data/tests/linalg/QR.rb +77 -0
  609. data/tests/linalg/SV.rb +24 -0
  610. data/tests/linalg/TDN.rb +116 -0
  611. data/tests/linalg/TDS.rb +122 -0
  612. data/tests/linalg/bidiag.rb +73 -0
  613. data/tests/linalg/cholesky.rb +20 -0
  614. data/tests/linalg/linalg.rb +158 -0
  615. data/tests/matrix/matrix_complex_test.rb +36 -0
  616. data/tests/matrix/matrix_nmf_test.rb +39 -0
  617. data/tests/matrix/matrix_test.rb +48 -0
  618. data/tests/min.rb +99 -0
  619. data/tests/monte/miser.rb +31 -0
  620. data/tests/monte/vegas.rb +45 -0
  621. data/tests/multifit/test_2dgauss.rb +112 -0
  622. data/tests/multifit/test_brown.rb +90 -0
  623. data/tests/multifit/test_enso.rb +246 -0
  624. data/tests/multifit/test_filip.rb +155 -0
  625. data/tests/multifit/test_gauss.rb +97 -0
  626. data/tests/multifit/test_longley.rb +110 -0
  627. data/tests/multifit/test_multifit.rb +52 -0
  628. data/tests/multimin.rb +139 -0
  629. data/tests/multiroot.rb +131 -0
  630. data/tests/multiset.rb +52 -0
  631. data/tests/narray/blas_dnrm2.rb +20 -0
  632. data/tests/odeiv.rb +353 -0
  633. data/tests/poly/poly.rb +290 -0
  634. data/tests/poly/special.rb +65 -0
  635. data/tests/qrng.rb +131 -0
  636. data/tests/quartic.rb +29 -0
  637. data/tests/randist.rb +134 -0
  638. data/tests/rng.rb +305 -0
  639. data/tests/roots.rb +76 -0
  640. data/tests/run-test.sh +17 -0
  641. data/tests/sf/gsl_test_sf.rb +249 -0
  642. data/tests/sf/test_airy.rb +83 -0
  643. data/tests/sf/test_bessel.rb +306 -0
  644. data/tests/sf/test_coulomb.rb +17 -0
  645. data/tests/sf/test_dilog.rb +25 -0
  646. data/tests/sf/test_gamma.rb +209 -0
  647. data/tests/sf/test_hyperg.rb +356 -0
  648. data/tests/sf/test_legendre.rb +227 -0
  649. data/tests/sf/test_mathieu.rb +59 -0
  650. data/tests/sf/test_mode.rb +19 -0
  651. data/tests/sf/test_sf.rb +839 -0
  652. data/tests/stats.rb +174 -0
  653. data/tests/stats_mt.rb +16 -0
  654. data/tests/sum.rb +98 -0
  655. data/tests/sys.rb +323 -0
  656. data/tests/tensor.rb +419 -0
  657. data/tests/vector/vector_complex_test.rb +101 -0
  658. data/tests/vector/vector_test.rb +141 -0
  659. data/tests/wavelet.rb +142 -0
  660. metadata +789 -0
@@ -0,0 +1,11 @@
1
+ #
2
+ # = rngextra
3
+ # See {Random number generation}[link:files/rdoc/rng_rdoc.html].
4
+ #
5
+ # {prev}[link:files/rdoc/graph_rdoc.html]
6
+ # {next}[link:files/rdoc/tensor_rdoc.html]
7
+ #
8
+ # {Reference index}[link:files/rdoc/ref_rdoc.html]
9
+ # {top}[link:files/rdoc/index_rdoc.html]
10
+ #
11
+ #
@@ -0,0 +1,305 @@
1
+ #
2
+ # = One dimensional root-finding and the solver classes
3
+ # One-dimensional root finding algorithms can be divided into two classes,
4
+ # <tt>root bracketing</tt> and <tt>root polishing</tt>. The state for bracketing solvers
5
+ # is held in a <tt>GSL::Root::FSolver</tt> object. The updating procedure uses only
6
+ # function evaluations (not derivatives). The state for root polishing solvers is
7
+ # held in a <tt>GSL::Root::FdfSolver</tt> object. The updates require both the function
8
+ # and its derivative (hence the name fdf) to be supplied by the user.
9
+ #
10
+ # Contents:
11
+ # 1. {Solver classes}[link:files/rdoc/roots_rdoc.html#1]
12
+ # 1. {Methods}[link:files/rdoc/roots_rdoc.html#2]
13
+ # 1. {Methods to solve equations}[link:files/rdoc/roots_rdoc.html#2.1]
14
+ # 1. {GSL::Function_fdf class: Providing the function to solve}[link:files/rdoc/roots_rdoc.html#2.2]
15
+ # 1. {Search Stopping Parameters}[link:files/rdoc/roots_rdoc.html#2.3]
16
+ # 1. {Higher-level interface}[link:files/rdoc/roots_rdoc.html#3]
17
+ # 1. {Example}[link:files/rdoc/roots_rdoc.html#4]
18
+ #
19
+ # == {}[link:index.html"name="1] Solver classes
20
+ #
21
+ # ---
22
+ # * GSL::Root::FSolver.alloc(T)
23
+ #
24
+ # This creates a equation solver with a root bracketing algorithm of type <tt>T</tt>.
25
+ # The type <tt>T</tt> is given by a String or a constant,
26
+ # * <tt>"bisection"</tt> or <tt>GSL::Root::FSolver::BISECION</tt>
27
+ # * <tt>"falsepos"</tt> or <tt>GSL::Root::FSolver::FALSEPOS</tt>
28
+ # * <tt>"brent"</tt> or <tt>GSL::Root::FSolver::BRENT</tt>.
29
+ #
30
+ # * Ex:
31
+ # include GSL::Root
32
+ # s1 = FSolver.alloc("bisection")
33
+ # s2 = FSolver.alloc("brent")
34
+ # s3 = FSolver.alloc(FSolver::BISECTION)
35
+ # s4 = FSolver.alloc(FSolver::BRENT)
36
+ #
37
+ # ---
38
+ # * GSL::Root::FdfSolver.alloc(T)
39
+ #
40
+ # This creates a derivative-based solver of type <tt>T</tt>.
41
+ # The type <tt>T</tt> is given by a String or a constant,
42
+ # * <tt>"newton"</tt> or <tt>GSL::Root::FdfSolver::NEWTON</tt>
43
+ # * <tt>"secant"</tt> or <tt>GSL::Root::FdfSolver::SECANT</tt>
44
+ # * <tt>"steffenson"</tt> or <tt>GSL::Root::FdfSolver::STEFFENSON</tt>.
45
+ #
46
+ # == {}[link:index.html"name="2] Methods
47
+ #
48
+ # ---
49
+ # * GSL::Root::FSolver#set(f, xl, xu)
50
+ #
51
+ # This initialize the solver <tt>self</tt> to use the function <tt>f</tt>,
52
+ # and the initial search
53
+ # interval <tt>xl, xu</tt>. The function to be solved <tt>f</tt> is given
54
+ # an instanse of the {GSL::Function}[link:files/rdoc/function_rdoc.html] class.
55
+ #
56
+ # ---
57
+ # * GSL::Root::FdfSolver#set(fdf, r)
58
+ #
59
+ # This initializes, or reinitializes, an existing solver <tt>self</tt>
60
+ # to use the function and derivative <tt>fdf</tt> and the initial guess <tt>r</tt>.
61
+ # Here <tt>fdf</tt> is a <tt>GSL::Function_fdf</tt> object (see below).
62
+ #
63
+ #
64
+ # === {}[link:index.html"name="2.1] Methods to solve equations
65
+ #
66
+ # ---
67
+ # * GSL::Root::FSolver#iterate
68
+ # * GSL::Root::FdfSolver#iterate
69
+ #
70
+ # This performs a single iteration of the solver. If the iteration encounters an unexpected problem then an error code will be returned ( <tt>GSL::EBADFUNC</tt> or
71
+ # <tt>GSL::EZERODIV</tt> ).
72
+ #
73
+ # ---
74
+ # * GSL::Root::FSolver#root
75
+ # * GSL::Root::FdfSolver#root
76
+ #
77
+ # Returns the current estimate of the root.
78
+ #
79
+ #
80
+ # ---
81
+ # * GSL::Root::FSolver#name
82
+ # * GSL::Root::FdfSolver#name
83
+ #
84
+ # This returns the name of the algorithm.
85
+ #
86
+ # ---
87
+ # * GSL::Root::FSolver#x_lower
88
+ # * GSL::Root::FSolver#x_upper
89
+ #
90
+ # Return the current bracketing interval for the solver.
91
+ #
92
+ # === {}[link:index.html"name="2.2] GSL::Function_fdf class: Providing the function to solve
93
+ # The <tt>FSolver</tt> object require an instance of the
94
+ # {GSL::Function}[link:files/rdoc/function_rdoc.html] class, which is already introduced elsewhere.
95
+ # The <tt>FdfSolver</tt> which uses the root-polishing algorithm requires not only
96
+ # the function to solve, but also
97
+ # procedures to calculate the derivatives. This is
98
+ # given by the <tt>GSL::Function_fdf</tt> class.
99
+ #
100
+ # ---
101
+ # * GSL::Function_fdf.alloc()
102
+ # * GSL::Function_fdf.alloc(f, df)
103
+ # * GSL::Function_fdf.alloc(f, df, fdf)
104
+ #
105
+ # Constructors. Here <tt>f, df</tt> are Ruby <tt>Proc</tt> objects which return a single value.
106
+ # The option <tt>fdf</tt> must return an array which contain the values of the function
107
+ # and its derivative.
108
+ #
109
+ # ---
110
+ # * GSL::Function_fdf#set(f, df)
111
+ # * GSL::Function_fdf#set(f, df, fdf)
112
+ #
113
+ # This initializes or reinitializes the <tt>Function_fdf</tt> object <tt>self</tt> by
114
+ # two or three <tt>Proc</tt> objects <tt>f, df</tt> and <tt>fdf</tt>.
115
+ #
116
+ # * ex: A quadratic equation a*x*x + b*x + c = 0:
117
+ #
118
+ # # Returns a value of the function
119
+ # f = Proc.new { |x, params|
120
+ # a = params[0]; b = params[1]; c = params[2]
121
+ # (a*x + b)*x + c
122
+ # }
123
+ # # Calculate the derivative
124
+ # df = Proc.new { |x, params|
125
+ # a = params[0]; b = params[1]
126
+ # 2*a*x + b
127
+ # }
128
+ #
129
+ # function_fdf = Function_fdf.alloc(f, df)
130
+ #
131
+ # ---
132
+ # * GSL::Function_fdf#set(f, df, params...)
133
+ # * GSL::Function_fdf#set(f, df, fdf, params...)
134
+ #
135
+ # This sets or resets the procedures and the constant parameters in the function.
136
+ #
137
+ # ---
138
+ # * GSL::Function_fdf#set_params(...)
139
+ #
140
+ # This sets or resets the constant parameters in the function.
141
+ #
142
+ # * Ex: x*x - 5 == 0
143
+ #
144
+ # function_fdf.set_params([1, 0, -5])
145
+ #
146
+ # === {}[link:index.html"name="2.3] Search Stopping Parameters
147
+ #
148
+ # ---
149
+ # * GSL::Root::test_interval(xl, xu, epsrel, epsabs)
150
+ #
151
+ # This function tests for the convergence of the interval
152
+ # <tt>[xl, xu]</tt> with absolute error <tt>epsabs</tt> and relative error <tt>epsrel</tt>.
153
+ # The test returns <tt>GSL::SUCCESS</tt> if the following condition is achieved,
154
+ # |a - b| < epsabs + epsrel min(|a|,|b|)
155
+ # when the interval x = [a,b] does not include the origin. If the interval includes
156
+ # the origin then min(|a|,|b|) is replaced by zero (which is the minimum value of
157
+ # |x| over the interval). This ensures that the relative error is accurately
158
+ # estimated for roots close to the origin.
159
+ #
160
+ # This condition on the interval also implies that any estimate of the root r in
161
+ # the interval satisfies the same condition with respect to the true root r0,
162
+ #
163
+ # |r - r0| < epsabs + epsrel r0
164
+ #
165
+ # assuming that the true root r0 is contained within the interval.
166
+ #
167
+ # ---
168
+ # * GSL::Root::test_delta(x1, x0, epsrel, epsabs)
169
+ #
170
+ # This function tests for the convergence of the sequence ..., <tt>x0, x1</tt> with
171
+ # absolute error <tt>epsabs</tt> and relative error <tt>epsrel</tt>.
172
+ # The test returns <tt>GSL::SUCCESS</tt> if the following condition is achieved,
173
+ # |x_1 - x_0| < epsabs + epsrel |x_1|
174
+ # and returns <tt>GSL::CONTINUE</tt> otherwise.
175
+ #
176
+ # ---
177
+ # * GSL::Root::test_residual(f, epsabs)
178
+ #
179
+ # This function tests the residual value <tt>f</tt> against the absolute error bound
180
+ # <tt>epsabs</tt>. The test returns <tt>GSL::SUCCESS</tt> if the following condition is
181
+ # achieved,
182
+ # |f| < epsabs
183
+ # and returns <tt>GSL::CONTINUE</tt> otherwise. This criterion is suitable for
184
+ # situations where the precise location of the root, x, is unimportant provided a
185
+ # value can be found where the residual, |f(x)|, is small enough.
186
+ #
187
+ # == {}[link:index.html"name="3] High-level interface
188
+ # ---
189
+ # * GSL::Root:FSolver.solve(func, [xl, xu], [epsabs = 0, epsrel = 1e-6])
190
+ #
191
+ # This method try to find a root of the function <tt>func</tt> between the interval
192
+ # <tt>[xl, xu]</tt>, with the accuracy <tt>[epsabs, epsrel]</tt> (optional). An array
193
+ # of 3 elements is returned, as [<tt>root, iterations, status</tt>].
194
+ #
195
+ # ---
196
+ # * GSL::Root:FdfSolver.solve(func, x0, [epsabs = 0, epsrel = 1e-6])
197
+ #
198
+ # This method try to find a root of the function <tt>func</tt> around <tt>x0</tt>,
199
+ # with the accuracy <tt>[epsabs, epsrel]</tt> (optional).
200
+ # An array of 3 elements is returned, as [<tt>root, iterations, status</tt>].
201
+ #
202
+ # ---
203
+ # * GSL::Function#fsolve([xl, xu])
204
+ # * GSL::Function#fsolve(xl, xu)
205
+ #
206
+ # These methods try to find a root of <tt>f(x) = 0</tt> between the interval
207
+ # <tt>[xl, xh]</tt> using Brent's algorithm.
208
+ # An array of 3 elements is returned, as [<tt>root, iterations, status</tt>].
209
+ #
210
+ # * ex:
211
+ # f = Function.alloc { |x| x*x - 5 }
212
+ # f.fsolve([0, 5]) <----- 2.23606797749979
213
+ #
214
+ # == {}[link:index.html"name="4] Example
215
+ # This example is equivalent to the one found in the GSL manual,
216
+ # using the Brent's algorithm to solve the equation x^2 - 5 = 0.
217
+ #
218
+ # #!/usr/bin/env ruby
219
+ # require "gsl"
220
+ #
221
+ # #solver = Root::FSolver.alloc("bisection")
222
+ # #solver = Root::FSolver.alloc("falsepos")
223
+ # solver = Root::FSolver.alloc(Root::FSolver::BRENT)
224
+ # puts "using #{solver.name} method"
225
+ #
226
+ # func = GSL::Function.alloc { |x, params| # Define a function to solve
227
+ # a = params[0]; b = params[1]; c = params[2]
228
+ # (a*x + b)*x + c
229
+ # }
230
+ # expected = Math::sqrt(5.0)
231
+ #
232
+ # func.set_params([1, 0, -5])
233
+ #
234
+ # printf("%5s [%9s, %9s] %9s %10s %9s\n",
235
+ # "iter", "lower", "upper", "root",
236
+ # "err", "err(est)")
237
+ #
238
+ # solver.set(func, 0.0, 5.0) # initialize the solver
239
+ # i = 1
240
+ # begin
241
+ # status = solver.iterate
242
+ # r = solver.root
243
+ # xl = solver.x_lower
244
+ # xu = solver.x_upper
245
+ # status = Root.test_interval(xl, xu, 0, 0.001) # Check convergence
246
+ # if status == GSL::SUCCESS
247
+ # printf("Converged:\n")
248
+ # end
249
+ # printf("%5d [%.7f, %.7f] %.7f %+.7f %.7f\n",
250
+ # i, xl, xu, r, r - expected, xu - xl)
251
+ #
252
+ # i += 1
253
+ # end while status != GSL::SUCCESS
254
+ #
255
+ # The following is an another version, using the <tt>FdfSolver</tt> with the Newton-Raphson
256
+ # algorithm.
257
+ #
258
+ # #!/usr/bin/env ruby
259
+ # require "gsl"
260
+ #
261
+ # f = Proc.new { |x, params|
262
+ # a = params[0]; b = params[1]; c = params[2]
263
+ # (a*x + b)*x + c
264
+ # }
265
+ #
266
+ # df = Proc.new { |x, params|
267
+ # a = params[0]; b = params[1]
268
+ # 2.0*a*x + b
269
+ # }
270
+ #
271
+ # function_fdf = Function_fdf.alloc(f, df)
272
+ # params = [1, 0, -5]
273
+ # function_fdf.set_params(params)
274
+ #
275
+ # solver = Root::FdfSolver.alloc(Root::FdfSolver::NEWTON)
276
+ # puts "using #{solver.name} method"
277
+ #
278
+ # expected = Math::sqrt(5.0)
279
+ # x = 5.0
280
+ # solver.set(function_fdf, x)
281
+ #
282
+ # printf("%-5s %10s %10s %10s\n", "iter", "root", "err", "err(est)")
283
+ # iter = 0
284
+ # begin
285
+ # iter += 1
286
+ # status = solver.iterate
287
+ # x0 = x
288
+ # x = solver.root
289
+ #
290
+ # status = Root::test_delta(x, x0, 0, 1e-3)
291
+ #
292
+ # if status == GSL::SUCCESS
293
+ # printf("Converged:\n")
294
+ # end
295
+ #
296
+ # printf("%5d %10.7f %+10.7f %10.7f\n", iter, x, x - expected, x - x0)
297
+ # end while status != GSL::SUCCESS
298
+ #
299
+ # {prev}[link:files/rdoc/dht_rdoc.html]
300
+ # {next}[link:files/rdoc/min_rdoc.html]
301
+ #
302
+ # {Reference index}[link:files/rdoc/ref_rdoc.html]
303
+ # {top}[link:files/rdoc/index_rdoc.html]
304
+ #
305
+ #
@@ -0,0 +1,40 @@
1
+ #
2
+ # = Ruby/GSL Screenshot
3
+ #
4
+ # == {}[link:index.html"name="1] Vector
5
+ # {Vector}[http://rb-gsl.rubyforge.org/vector.png]
6
+ #
7
+ # == {}[link:index.html"name="2] Matrix
8
+ # {Matrix}[http://rb-gsl.rubyforge.org/matrix.png]
9
+ #
10
+ # == {}[link:index.html"name="3] Special Functions
11
+ # {Graph}[http://rb-gsl.rubyforge.org/sf.png]
12
+ #
13
+ # == {}[link:index.html"name="4] Polynomials
14
+ # {Polynomial}[http://rb-gsl.rubyforge.org/poly.png]
15
+ #
16
+ # == {}[link:index.html"name="5] Numerical Integration
17
+ # {Integration}[http://rb-gsl.rubyforge.org/integ.png]
18
+ #
19
+ # == {}[link:index.html"name="6] Random numbers, PDFs, Histograms
20
+ # {Random}[http://rb-gsl.rubyforge.org/rng.png]
21
+ #
22
+ # == {}[link:index.html"name="7] Wavelet Transforms
23
+ # {ODE}[http://rb-gsl.rubyforge.org/dwt.png]
24
+ #
25
+ # == {}[link:index.html"name="8] ODE
26
+ # {ODE}[http://rb-gsl.rubyforge.org/odeiv.png]
27
+ #
28
+ # == {}[link:index.html"name="9] Chebyshev Approximations
29
+ # {Chebyshev}[http://rb-gsl.rubyforge.org/cheb.png]
30
+ #
31
+ # == {}[link:index.html"name="10] Root Finding
32
+ # {Root}[http://rb-gsl.rubyforge.org/root.png]
33
+ #
34
+ # == {}[link:index.html"name="11] Minimization
35
+ # {Min}[http://rb-gsl.rubyforge.org/min.png]
36
+ #
37
+ # == {}[link:index.html"name="12] Nonlinear Fitting
38
+ # {Fit}[http://rb-gsl.rubyforge.org/fit.png]
39
+ #
40
+ #
@@ -0,0 +1,1622 @@
1
+ #
2
+ # = Special Functions
3
+ #
4
+ # === {}[link:index.html"name="0.1] Contents:
5
+ # 1. {Usage:}[link:files/rdoc/sf_rdoc.html#1]
6
+ # 1. {GSL::Sf::Result class}[link:files/rdoc/sf_rdoc.html#2]
7
+ # 1. {Modes}[link:files/rdoc/sf_rdoc.html#3]
8
+ # 1. {Airy functions}[link:files/rdoc/sf_rdoc.html#4]
9
+ # 1. {Bessel functins}[link:files/rdoc/sf_rdoc.html#5]
10
+ # 1. {Clausen functins}[link:files/rdoc/sf_rdoc.html#6]
11
+ # 1. {Coulomb functins}[link:files/rdoc/sf_rdoc.html#7]
12
+ # 1. {Coupling coefficients}[link:files/rdoc/sf_rdoc.html#8]
13
+ # 1. {Dawson coefficients}[link:files/rdoc/sf_rdoc.html#9]
14
+ # 1. {Debye coefficients}[link:files/rdoc/sf_rdoc.html#10]
15
+ # 1. {Dilogarithm}[link:files/rdoc/sf_rdoc.html#11]
16
+ # 1. {Elementary operations}[link:files/rdoc/sf_rdoc.html#12]
17
+ # 1. {Elliptic integrals}[link:files/rdoc/sf_rdoc.html#13]
18
+ # 1. {Elliptic functions}[link:files/rdoc/sf_rdoc.html#14]
19
+ # 1. {Error functions}[link:files/rdoc/sf_rdoc.html#15]
20
+ # 1. {Exponential functions}[link:files/rdoc/sf_rdoc.html#16]
21
+ # 1. {Exponential integrals}[link:files/rdoc/sf_rdoc.html#17]
22
+ # 1. {Fermi-Dirac function}[link:files/rdoc/sf_rdoc.html#18]
23
+ # 1. {Gamma function}[link:files/rdoc/sf_rdoc.html#19]
24
+ # 1. {Gegenbauer functions}[link:files/rdoc/sf_rdoc.html#20]
25
+ # 1. {Hypergeometric functions}[link:files/rdoc/sf_rdoc.html#21]
26
+ # 1. {Laguerre functions}[link:files/rdoc/sf_rdoc.html#22]
27
+ # 1. {Lambert W functions}[link:files/rdoc/sf_rdoc.html#23]
28
+ # 1. {Legendre functions and spherical harmonics}[link:files/rdoc/sf_rdoc.html#24]
29
+ # 1. {Logarithm and related functions}[link:files/rdoc/sf_rdoc.html#25]
30
+ # 1. {Mathieu functions}[link:files/rdoc/sf_rdoc.html#26]
31
+ # 1. {Power function}[link:files/rdoc/sf_rdoc.html#27]
32
+ # 1. {Psi (digamma) function}[link:files/rdoc/sf_rdoc.html#28]
33
+ # 1. {Synchrotron functions}[link:files/rdoc/sf_rdoc.html#29]
34
+ # 1. {Transport functions}[link:files/rdoc/sf_rdoc.html#30]
35
+ # 1. {Trigonometric functions}[link:files/rdoc/sf_rdoc.html#31]
36
+ # 1. {Zeta functions}[link:files/rdoc/sf_rdoc.html#32]
37
+ #
38
+ # == {}[link:index.html"name="1] Usage
39
+ # Ruby/GSL provides all the (documented) GSL special functions as module functions
40
+ # under the <tt>GSL::Sf</tt> module.
41
+ # The prefix <tt>gsl_sf_</tt> in C functions is replaced by the module
42
+ # identifier <tt>GSL::Sf::</tt>. For example, the regular Bessel function of 0-th order
43
+ # is evaluated as
44
+ # y = GSL::Sf::bessel_J0(x)
45
+ # or
46
+ # include GSL::Sf
47
+ # y = bessel_J0(x)
48
+ # where the argument <tt>x</tt> can be a <tt>Numeric</tt>, <tt>GSL::Vector</tt>,
49
+ # <tt>GSL::Matrix</tt>, or an <tt>NArray</tt> object.
50
+ #
51
+ # Example:
52
+ # >> require("gsl")
53
+ # => true
54
+ # >> x = 1.0
55
+ # => 1.0
56
+ # >> Sf::bessel_J0(x)
57
+ # => 0.765197686557967
58
+ # >> x = Vector[1, 2, 3, 4]
59
+ # => GSL::Vector
60
+ # [ 1.000e+00 2.000e+00 3.000e+00 4.000e+00 ]
61
+ # >> Sf::bessel_J0(x)
62
+ # => GSL::Vector
63
+ # [ 7.652e-01 2.239e-01 -2.601e-01 -3.971e-01 ]
64
+ # >> x = Matrix[1..4, 2, 2]
65
+ # => GSL::Matrix
66
+ # [ 1.000e+00 2.000e+00
67
+ # 3.000e+00 4.000e+00 ]
68
+ # >> Sf::bessel_J0(x)
69
+ # => GSL::Matrix
70
+ # [ 7.652e-01 2.239e-01
71
+ # -2.601e-01 -3.971e-01 ]
72
+ # >> x = NArray[1.0, 2, 3, 4]
73
+ # => NArray.float(4):
74
+ # [ 1.0, 2.0, 3.0, 4.0 ]
75
+ # >> Sf::bessel_J0(x)
76
+ # => NArray.float(4):
77
+ # [ 0.765198, 0.223891, -0.260052, -0.39715 ]
78
+ #
79
+ # == {}[link:index.html"name="2] <tt>GSL::Sf::Result</tt> Class
80
+ # The Ruby methods as wrappers of GSL functions with the suffix "<tt>_e</tt>" return
81
+ # <tt>GSL::Sf::Result</tt> objects which contain the function values as well as
82
+ # error information.
83
+ #
84
+ # === <tt>GSL::Sf::Result</tt> instance methods
85
+ #
86
+ # ---
87
+ # * GSL::Sf::Result#val
88
+ # Returns the value.
89
+ # ---
90
+ # * GSL::Sf::Result#err
91
+ # Returns the error.
92
+ # ---
93
+ # * GSL::Sf::Result_e10#val
94
+ # Returns the value.
95
+ # ---
96
+ # * GSL::Sf::Result_e10#err
97
+ # Returns the error.
98
+ #
99
+ # == {}[link:index.html"name="3] Modes
100
+ # The goal of the library is to achieve double precision accuracy wherever possible.
101
+ # However the cost of evaluating some special functions to double precision can
102
+ # be significant, particularly where very high order terms are required.
103
+ # In these cases a <tt>mode</tt> argument allows the accuracy of the function
104
+ # to be reduced in order to improve performance.
105
+ # The following precision levels are available for the mode argument,
106
+ # given by Fixnum constants under the <tt>GSL</tt> module,
107
+ # * <tt>GSL::PREC_DOUBLE</tt>
108
+ # Double-precision, a relative accuracy of approximately 2 * 10^-16.
109
+ # * <tt>GSL::PREC_SINGLE</tt>
110
+ # Single-precision, a relative accuracy of approximately 10^-7.
111
+ # * <tt>GSL::PREC_APPROX</tt>
112
+ # Approximate values, a relative accuracy of approximately 5 * 10^-4.
113
+ #
114
+ # The approximate mode provides the fastest evaluation at the lowest accuracy.
115
+ #
116
+ # == {}[link:index.html"name="4] Airy Functions and Derivatives
117
+ # ---
118
+ # * GSL::Sf::airy_Ai(x, mode = GSL::PREC_DOUBLE)
119
+ #
120
+ # Computes the Airy function Ai(x) with an accuracy specified by <tt>mode</tt>.
121
+ # ---
122
+ # * GSL::Sf::airy_Bi(x, mode = GSL::PREC_DOUBLE)
123
+ #
124
+ # Computes the Airy function Bi(x) with an accuracy specified by <tt>mode</tt>.
125
+ # ---
126
+ # * GSL::Sf::airy_Ai_scaled(x, mode = GSL::PREC_DOUBLE)
127
+ #
128
+ # Computes a scaled version of the Airy function S_A(x) Ai(x).
129
+ # For x>0 the scaling factor S_A(x) is exp(+(2/3) x^(3/2)), and is 1 for x<0.
130
+ # ---
131
+ # * GSL::Sf::airy_Bi_scaled(x, mode = GSL::PREC_DOUBLE)
132
+ #
133
+ # Computes a scaled version of the Airy function S_B(x) Bi(x).
134
+ # For x>0 the scaling factor S_B(x) is exp(-(2/3) x^(3/2)), and is 1 for x<0.
135
+ #
136
+ # === {}[link:index.html"name="4.1] Derivatives of Airy Functions
137
+ # ---
138
+ # * GSL::Sf::airy_Ai_deriv(x, mode = GSL::PREC_DOUBLE)
139
+ #
140
+ # Computes the Airy function derivative Ai'(x) with an accuracy
141
+ # specified by <tt>mode</tt>.
142
+ # ---
143
+ # * GSL::Sf::airy_Bi_deriv(x, mode = GSL::PREC_DOUBLE)
144
+ #
145
+ # Computes the Airy function derivative Bi'(x) with an accuracy
146
+ # specified by <tt>mode</tt>.
147
+ # ---
148
+ # * GSL::Sf::airy_Ai_deriv_scaled(x, mode = GSL::PREC_DOUBLE)
149
+ #
150
+ # Computes the derivative of the scaled Airy function S_A(x) Ai(x).
151
+ # ---
152
+ # * GSL::Sf::airy_Bi_deriv_scaled(x, mode = GSL::PREC_DOUBLE)
153
+ #
154
+ # Computes the derivative of the scaled Airy function S_B(x) Bi(x).
155
+ #
156
+ # === {}[link:index.html"name="4.2] Zeros of Airy Functions
157
+ # ---
158
+ # * GSL::Sf::airy_zero_Ai(s)
159
+ #
160
+ # Computes the location of the <tt>s</tt>-th zero of the Airy function Ai(x).
161
+ # ---
162
+ # * GSL::Sf::airy_zero_Bi(s)
163
+ #
164
+ # Computes the location of the <tt>s</tt>-th zero of the Airy function Bi(x).
165
+ #
166
+ # === {}[link:index.html"name="4.3] Zeros of Derivatives of Airy Functions
167
+ # ---
168
+ # * GSL::Sf::airy_zero_Ai_deriv(s)
169
+ #
170
+ # Computes the location of the <tt>s</tt>-th zero of the Airy function
171
+ # derivative Ai'(x).
172
+ # ---
173
+ # * GSL::Sf::airy_zero_Bi_deriv(s)
174
+ #
175
+ # Computes the location of the <tt>s</tt>-th zero of the Airy function
176
+ # derivative Bi'(x).
177
+ #
178
+ #
179
+ # == {}[link:index.html"name="5] Bessel Functions
180
+ # === {}[link:index.html"name="5.1] Regular Cylindrical Bessel Functions
181
+ # ---
182
+ # * GSL::Sf::bessel_J0(x)
183
+ #
184
+ # Computes the regular cylindrical Bessel function of zeroth order, J_0(x).
185
+ # ---
186
+ # * GSL::Sf::bessel_J1(x)
187
+ #
188
+ # Computes the regular cylindrical Bessel function of first order, J_1(x).
189
+ # ---
190
+ # * GSL::Sf::bessel_Jn(n, x)
191
+ #
192
+ # Computes the regular cylindrical Bessel function of order <tt>n</tt>, J_n(x).
193
+ # ---
194
+ # * GSL::Sf::bessel_Jn_array(nmin, nmax, x)
195
+ #
196
+ # Computes the values of the regular cylindrical Bessel functions J_n(x)
197
+ # for n from <tt>nmin</tt> to <tt>nmax</tt> inclusive, and returns the
198
+ # results as a <tt>GSL::Vector</tt> object.
199
+ # The values are computed using recurrence relations, for efficiency,
200
+ # and therefore may differ slightly from the exact values.
201
+ # === {}[link:index.html"name="5.2] Irregular Cylindrical Bessel Functions
202
+ # ---
203
+ # * GSL::Sf::bessel_Y0(x)
204
+ #
205
+ # Computes the irregular cylindrical Bessel function of zeroth order, Y_0(x).
206
+ # ---
207
+ # * GSL::Sf::bessel_Y1(x)
208
+ #
209
+ # Computes the irregular cylindrical Bessel function of first order, Y_1(x).
210
+ # ---
211
+ # * GSL::Sf::bessel_Yn(n, x)
212
+ #
213
+ # Computes the irregular cylindrical Bessel function of order <tt>n</tt>, Y_n(x).
214
+ # ---
215
+ # * GSL::Sf::bessel_Yn_array(nmin, nmax, x)
216
+ #
217
+ # Computes the values of the irregular cylindrical Bessel functions Y_n(x)
218
+ # for n from <tt>nmin</tt> to <tt>nmax</tt> inclusive, and returns the
219
+ # results as a <tt>GSL::Vector</tt> object.
220
+ # The values are computed using recurrence relations, for efficiency,
221
+ # and therefore may differ slightly from the exact values.
222
+ #
223
+ # === {}[link:index.html"name="5.3] Regular Modified Cylindrical Bessel Functions
224
+ # ---
225
+ # * GSL::Sf::bessel_I0(x)
226
+ #
227
+ # Computes the regular modified cylindrical Bessel function of zeroth order,
228
+ # I_0(x).
229
+ # ---
230
+ # * GSL::Sf::bessel_I1(x)
231
+ #
232
+ # Computes the regular modified cylindrical Bessel function of first order,
233
+ # I_1(x).
234
+ # ---
235
+ # * GSL::Sf::bessel_In(n, x)
236
+ #
237
+ # Computes the regular modified cylindrical Bessel function of order <tt>n</tt>,
238
+ # I_n(x).
239
+ # ---
240
+ # * GSL::Sf::bessel_In_array(nmin, nmax, x)
241
+ #
242
+ # Computes the values of the regular modified cylindrical Bessel functions
243
+ # I_n(x) for n from <tt>nmin</tt> to <tt>nmax</tt> inclusive, and returns the
244
+ # results as a <tt>GSL::Vector</tt> object. The start of the range <tt>nmin</tt>
245
+ # must be positive or zero. The values are computed using recurrence relations,
246
+ # for efficiency, and therefore may differ slightly from the exact values.
247
+ # ---
248
+ # * GSL::Sf::bessel_I0_scaled(x)
249
+ #
250
+ # Computes the scaled regular modified cylindrical Bessel function of
251
+ # zeroth order, exp(-|x|) I_0(x).
252
+ # ---
253
+ # * GSL::Sf::bessel_I1_scaled(x)
254
+ #
255
+ # Computes the scaled regular modified cylindrical Bessel function of first
256
+ # order, exp(-|x|)I_1(x).
257
+ # ---
258
+ # * GSL::Sf::bessel_In_scaled(n, x)
259
+ #
260
+ # Computes the scaled regular modified cylindrical Bessel function of order
261
+ # <tt>n</tt>, exp(-|x|) I_n(x).
262
+ # ---
263
+ # * GSL::Sf::bessel_In_scaled_array(nmin, nmax, x)
264
+ #
265
+ # Computes the values of the scaled regular modified cylindrical Bessel
266
+ # functions exp(-|x|) I_n(x) for n from <tt>nmin</tt> to <tt>nmax</tt> inclusive,
267
+ # and returns the results as a <tt>GSL::Vector</tt> object. The start of the range
268
+ # <tt>nmin</tt> must be positive or zero. The values are computed using
269
+ # recurrence relations, for efficiency, and therefore may differ slightly
270
+ # from the exact values.
271
+ #
272
+ # === {}[link:index.html"name="5.4] Irregular Modified Cylindrical Bessel Functions
273
+ # ---
274
+ # * GSL::Sf::bessel_K0(x)
275
+ #
276
+ # Computes the irregular modified cylindrical Bessel function
277
+ # of zeroth order, K_0(x), for x > 0.
278
+ # ---
279
+ # * GSL::Sf::bessel_K1(x)
280
+ #
281
+ # Computes the irregular modified cylindrical Bessel function
282
+ # of first order, K_1(x), for x > 0.
283
+ # ---
284
+ # * GSL::Sf::bessel_Kn(n, x)
285
+ #
286
+ # Computes the irregular modified cylindrical Bessel function
287
+ # of order <tt>n</tt>, K_n(x), for x > 0.
288
+ # ---
289
+ # * GSL::Sf::bessel_Kn_array(nmin, nmax, x)
290
+ #
291
+ # Computes the values of the irregular modified cylindrical Bessel
292
+ # functions K_n(x) for n from <tt>nmin</tt> to <tt>nmax</tt> inclusive,
293
+ # and returns the results as a <tt>GSL::Vector</tt> object.
294
+ # The start of the range <tt>nmin</tt> must be positive or zero.
295
+ # The domain of the function is <tt>x>0</tt>.
296
+ # The values are computed using recurrence relations, for efficiency,
297
+ # and therefore may differ slightly from the exact values.
298
+ # ---
299
+ # * GSL::Sf::bessel_K0_scaled(x)
300
+ #
301
+ # Computes the scaled irregular modified cylindrical Bessel function
302
+ # of zeroth order exp(x) K_0(x) for x>0.
303
+ # ---
304
+ # * GSL::Sf::bessel_K1_scaled(x)
305
+ #
306
+ # Computes the scaled irregular modified cylindrical Bessel function
307
+ # of first order exp(x) K_1(x) for x>0
308
+ # ---
309
+ # * GSL::Sf::bessel_Kn_scaled(n, x)
310
+ #
311
+ # Computes the scaled irregular modified cylindrical Bessel function
312
+ # of order <tt>n</tt>, exp(x) K_n(x), for x>0.
313
+ # ---
314
+ # * GSL::Sf::bessel_Kn_scaled_array(nmin, nmax, x)
315
+ #
316
+ # Computes the values of the scaled irregular cylindrical Bessel functions
317
+ # exp(x) K_n(x) for n from <tt>nmin</tt> to <tt>nmax</tt> inclusive,
318
+ # and returns the results as a <tt>GSL::Vector</tt> object.
319
+ # The start of the range nmin must be positive or zero.
320
+ # The domain of the function is x>0. The values are computed
321
+ # using recurrence relations, for efficiency,
322
+ # and therefore may differ slightly from the exact values.
323
+ #
324
+ # === {}[link:index.html"name="5.5] Regular Spherical Bessel Functions
325
+ # ---
326
+ # * GSL::Sf::bessel_j0(x)
327
+ #
328
+ # Computes the regular spherical Bessel function of zeroth order,
329
+ # j0(x) = sin(x)/x.
330
+ # ---
331
+ # * GSL::Sf::bessel_j1(x)
332
+ #
333
+ # Computes the regular spherical Bessel function of first order,
334
+ # j1(x) = (sin(x)/x - cos(x))/x.
335
+ # ---
336
+ # * GSL::Sf::bessel_j2(x)
337
+ #
338
+ # Computes the regular spherical Bessel function of second order,
339
+ # j2(x) = ((3/x^2 - 1)sin(x) - 3cos(x)/x)/x.
340
+ # ---
341
+ # * GSL::Sf::bessel_jl(l, x)
342
+ #
343
+ # Computes the regular spherical Bessel function of order l,
344
+ # j_l(x), for l >= 0 and x >= 0.
345
+ # ---
346
+ # * GSL::Sf::bessel_jl_array(lmax, x)
347
+ #
348
+ # Computes the values of the regular spherical Bessel functions j_l(x)
349
+ # for l from 0 to <tt>lmax</tt> inclusive for lmax >= 0 and x >= 0,
350
+ # and returns the results as a <tt>GSL::Vector</tt> object.
351
+ # The values are computed using recurrence relations, for efficiency,
352
+ # and therefore may differ slightly from the exact values.
353
+ # ---
354
+ # * GSL::Sf::bessel_jl_steed_array(lmax, x)
355
+ #
356
+ # This method uses Steed's method to compute the values of the regular
357
+ # spherical Bessel functions j_l(x) for l from 0 to <tt>lmax</tt> inclusive
358
+ # for <tt>lmax</tt> >= 0 and x >= 0, and returns the results as a <tt>GSL::Vector</tt>
359
+ # object. The Steed/Barnett algorithm is described in
360
+ # Comp. Phys. Comm. 21, 297 (1981). Steed's method is more stable than the
361
+ # recurrence used in the other functions but is also slower.
362
+ #
363
+ # === {}[link:index.html"name="5.6] Irregular Spherical Bessel Functions
364
+ # ---
365
+ # * GSL::Sf::bessel_y0(x)
366
+ #
367
+ # Computes the irregular spherical Bessel function of zeroth order,
368
+ # y_0(x) = -cos(x)/x.
369
+ # ---
370
+ # * GSL::Sf::bessel_y1(x)
371
+ #
372
+ # Computes the irregular spherical Bessel function of first order,
373
+ # y_1(x) = -(cos(x)/x + sin(x))/x.
374
+ # ---
375
+ # * GSL::Sf::bessel_y2(x)
376
+ #
377
+ # Computes the irregular spherical Bessel function of second order,
378
+ # y_2(x) = (-3/x^3 + 1/x)cos(x) - (3/x^2)sin(x).
379
+ # ---
380
+ # * GSL::Sf::bessel_yl(l, x)
381
+ #
382
+ # Computes the irregular spherical Bessel function of order <tt>l</tt>,
383
+ # y_l(x), for l >= 0.
384
+ # ---
385
+ # * GSL::Sf::bessel_yl_array(lmax, x)
386
+ #
387
+ # This method computes the values of the irregular spherical Bessel functions
388
+ # y_l(x) for l from 0 to <tt>lmax</tt> inclusive for <tt>lmax >= 0</tt>),
389
+ # and returns the results as a <tt>GSL::Vector</tt> object.
390
+ # The values are computed using recurrence relations, for efficiency,
391
+ # and therefore may differ slightly from the exact values.
392
+ #
393
+ # === {}[link:index.html"name="5.7] Regular Modified Spherical Bessel Functions
394
+ # ---
395
+ # * GSL::Sf::bessel_i0_scaled(x)
396
+ #
397
+ # Computes the scaled regular modified spherical Bessel function of zeroth
398
+ # order, exp(-|x|) i_0(x).
399
+ # ---
400
+ # * GSL::Sf::bessel_i1_scaled(x)
401
+ #
402
+ # Computes the scaled regular modified spherical Bessel function of first
403
+ # order, exp(-|x|) i_1(x).
404
+ # ---
405
+ # * GSL::Sf::bessel_i2_scaled(x)
406
+ #
407
+ # Computes the scaled regular modified spherical Bessel function of second
408
+ # order, exp(-|x|) i_2(x).
409
+ # ---
410
+ # * GSL::Sf::bessel_il_scaled(l, x)
411
+ #
412
+ # Computes the scaled regular modified spherical Bessel function of
413
+ # order <tt>l</tt>, exp(-|x|) i_l(x).
414
+ # ---
415
+ # * GSL::Sf::bessel_il_scaled_array(lmax, x)
416
+ #
417
+ # This routine computes the values of the scaled regular modified cylindrical
418
+ # Bessel functions exp(-|x|) i_l(x) for l from 0 to <tt>lmax</tt> inclusive for
419
+ # <tt>lmax >= 0</tt>, and returns the results as a <tt>GSL::Vector</tt> object.
420
+ # The values are computed using recurrence relations, for efficiency,
421
+ # and therefore may differ slightly from the exact values.
422
+ #
423
+ # === {}[link:index.html"name="5.8] Irregular Modified Spherical Bessel Functions
424
+ # ---
425
+ # * GSL::Sf::bessel_k0_scaled(x)
426
+ #
427
+ # Computes the scaled irregular modified spherical Bessel function of zeroth
428
+ # order, exp(-|x|) k_0(x).
429
+ # ---
430
+ # * GSL::Sf::bessel_k1_scaled(x)
431
+ #
432
+ # Computes the scaled irregular modified spherical Bessel function of first
433
+ # order, exp(-|x|) k_1(x).
434
+ # ---
435
+ # * GSL::Sf::bessel_k2_scaled(x)
436
+ #
437
+ # Computes the scaled irregular modified spherical Bessel function of second
438
+ # order, exp(-|x|) k_2(x).
439
+ # ---
440
+ # * GSL::Sf::bessel_kl_scaled(l, x)
441
+ #
442
+ # Computes the scaled irregular modified spherical Bessel function of
443
+ # order <tt>l</tt>, exp(-|x|) k_l(x).
444
+ # ---
445
+ # * GSL::Sf::bessel_kl_scaled_array(lmax, x)
446
+ #
447
+ # This routine computes the values of the scaled irregular modified cylindrical
448
+ # Bessel functions exp(-|x|) k_l(x) for l from 0 to <tt>lmax</tt> inclusive for
449
+ # <tt>lmax >= 0</tt>, and returns the results as a <tt>GSL::Vector</tt> object.
450
+ # The values are computed using recurrence relations, for efficiency,
451
+ # and therefore may differ slightly from the exact values.
452
+ #
453
+ # === {}[link:index.html"name="5.9] Regular Bessel Function - Fractional Order
454
+ # ---
455
+ # * GSL::Sf::bessel_Jnu(nu, x)
456
+ #
457
+ # Computes the regular cylindrical Bessel function of fractional
458
+ # order <tt>nu</tt>, J_nu(x).
459
+ # ---
460
+ # * GSL::Sf::bessel_sequence_Jnu_e(nu, v)
461
+ # * GSL::Sf::bessel_sequence_Jnu_e(nu, mode, v)
462
+ #
463
+ # These compute the regular cylindrical Bessel function of fractional order nu, J_nu(x),
464
+ # evaluated at a series of x values. The <tt>GSL::Vector</tt> object <tt>v</tt>
465
+ # contains the x values. They are assumed to be strictly ordered and positive.
466
+ # The vector is over-written with the values of J_nu(x_i).
467
+ #
468
+ # === {}[link:index.html"name="5.10] Irregular Bessel Functions - Fractional Order
469
+ # ---
470
+ # * GSL::Sf::bessel_Ynu(nu, x)
471
+ #
472
+ # Computes the irregular cylindrical Bessel function of fractional order <tt>nu</tt>,
473
+ # Y_nu(x).
474
+ #
475
+ # === {}[link:index.html"name="5.11] Regular Modified Bessel Functions - Fractional Order
476
+ # ---
477
+ # * GSL::Sf::bessel_Inu(nu, x)
478
+ #
479
+ # Computes the regular modified Bessel function of fractional order <tt>nu</tt>,
480
+ # I_nu(x) for x>0, nu>0.
481
+ # ---
482
+ # * GSL::Sf::bessel_Inu_scaled(nu, x)
483
+ #
484
+ # Computes the scaled regular modified Bessel function of fractional order <tt>nu</tt>,
485
+ # exp(-|x|) I_nu(x) for x>0, nu>0.
486
+ #
487
+ # === {}[link:index.html"name="5.12] Irregular Modified Bessel Functions - Fractional Order
488
+ # ---
489
+ # * GSL::Sf::bessel_Knu(nu, x)
490
+ #
491
+ # Computes the irregular modified Bessel function of fractional order <tt>nu</tt>,
492
+ # K_nu(x) for x>0, nu>0.
493
+ # ---
494
+ # * GSL::Sf::bessel_lnKnu(nu, x)
495
+ #
496
+ # Computes the logarithm of the irregular modified Bessel function of fractional
497
+ # order <tt>nu</tt>, ln(K_nu(x)) for x>0, nu>0
498
+ # ---
499
+ # * GSL::Sf::bessel_Knu_scaled(nu, x)
500
+ #
501
+ # Computes the scaled irregular modified Bessel function of fractional order <tt>nu</tt>,
502
+ # exp(+|x|) K_nu(x) for x>0, nu>0.
503
+ #
504
+ # === {}[link:index.html"name="5.13] Zeros of Regular Bessel Functions
505
+ # ---
506
+ # * GSL::Sf::bessel_zero_J0(s)
507
+ #
508
+ # Computes the location of the <tt>s</tt>-th positive zero of the Bessel function J_0(x).
509
+ # ---
510
+ # * GSL::Sf::bessel_zero_J1(s)
511
+ #
512
+ # Computes the location of the <tt>s</tt>-th positive zero of the Bessel function J_1(x).
513
+ # ---
514
+ # * GSL::Sf::bessel_zero_Jnu(nu, s)
515
+ #
516
+ # Computes the location of the <tt>s</tt>-th positive zero of the Bessel function
517
+ # J_nu(x). The current implementation does not support negative values of <tt>nu</tt>.
518
+ #
519
+ # == {}[link:index.html"name="6] Clausen Functions
520
+ # ---
521
+ # * GSL::Sf::clausen(x)
522
+ #
523
+ # The Clausen function is defined by the following integral,
524
+ # Cl_2(x) = - int_0^x dt log(2 sin(t/2))
525
+ # It is related to the dilogarithm by Cl_2(theta) = Im Li_2(exp(i theta)).
526
+ #
527
+ #
528
+ # == {}[link:index.html"name="7] Coulomb Functions
529
+ # ---
530
+ # * GSL::Sf::hydrogenicR_1(Z, r)
531
+ #
532
+ # Computes the lowest-order normalized hydrogenic bound state
533
+ # radial wavefunction R_1 := 2Z sqrt{Z} exp(-Z r).
534
+ # ---
535
+ # * GSL::Sf::hydrogenicR(n, l, Z, r)
536
+ #
537
+ # Computes the <tt>n</tt>-th normalized hydrogenic bound state radial wavefunction,
538
+ # R_n := 2 (Z^{3/2}/n^2) sqrt{(n-l-1)!/(n+l)!}exp(-Z r/n) (2Z/n)^l L^{2l+1}_{n-l-1}(2Z/n r).
539
+ # The normalization is chosen such that the wavefunction psi is given by
540
+ # psi(n,l,r) = R_n Y_{lm}.
541
+ #
542
+ # === {}[link:index.html"name="7.1] Coulomb Wave Functions
543
+ # ---
544
+ # * GSL::Sf::coulomb_wave_FG_e(eta, x, L, k)
545
+ #
546
+ # This method computes the coulomb wave functions
547
+ # F_L(eta,x), G_{L-k}(eta,x) and their derivatives with respect to x,
548
+ # F'_L(eta,x) G'_{L-k}(eta,x).
549
+ # The parameters are restricted to <tt>L</tt>, <tt>L-k > -1/2</tt>, <tt>x > 0</tt>
550
+ # and integer <tt>k</tt>. Note that <tt>L</tt> itself is not restricted to being
551
+ # an integer. The results are returned as an array of 7 elements,
552
+ # <tt>[F, G, Fp, Gp, exp_F, exp_G, status]</tt>,
553
+ # as <tt>F, G</tt> for the function values, <tt>Fp, Gp</tt>
554
+ # for the derivative values, and <tt>exp_F, exp_G</tt> for scaling exponents
555
+ # in the case of overflow occurs.
556
+ # ---
557
+ # * GSL::Sf::coulomb_wave_F_array(Lmin, kmax, eta, x)
558
+ #
559
+ # This method computes the function F_L(eta,x) for
560
+ # L = <tt>Lmin ... Lmin + kmax</tt> and returns the results
561
+ # as an array of 3 elements,
562
+ # <tt>[fc_array, F_exponent, status]</tt>.
563
+ # In the case of overflow, the exponent is returned in <tt>F_exponent</tt>.
564
+ # ---
565
+ # * GSL::Sf::coulomb_wave_FG_array(Lmin, kmax, eta, x)
566
+ #
567
+ # This method computes the functions F_L(eta,x), G_L(eta,x) for L = <tt>Lmin</tt>
568
+ # ... <tt>Lmin + kmax</tt> and returns the results as an array of
569
+ # 5 elements, <tt>[fc_array, gc_array, F_exponent, G_exponent, status]</tt>.
570
+ # In the case of overflow the exponents are stored in <tt>F_exponent</tt>
571
+ # and <tt>G_exponent</tt>.
572
+ # ---
573
+ # * GSL::Sf::coulomb_wave_FGp_array(Lmin, kmax, eta, x)
574
+ #
575
+ # This method computes the functions F_L(eta,x), G_L(eta,x) and
576
+ # their derivatives F'_L(eta,x), G'_L(eta,x) for L = <tt>Lmin</tt> ...
577
+ # <tt>Lmin + kmax</tt> and returns the results as an array of 7 elements,
578
+ # <tt>[fc_array, gc_array, fcp_array, gcp_array, F_exponent, G_exponent, status]</tt>.
579
+ # In the case of overflow the exponents are stored in <tt>F_exponent</tt>
580
+ # and <tt>G_exponent</tt>.
581
+ # ---
582
+ # * GSL::Sf::coulomb_wave_sphF_array(Lmin, kmax, eta, x)
583
+ #
584
+ # This method computes the Coulomb wave function divided by the argument
585
+ # F_L(eta, x)/x for L = <tt>Lmin</tt> ... <tt>Lmin + kmax</tt>,
586
+ # and returns the results as an array of 3 elememnts,
587
+ # <tt>[fc_array, F_exponent, status]</tt>.
588
+ # In the case of overflow the exponent is stored in <tt>F_exponent</tt>.
589
+ # This function reduces to spherical Bessel functions in the limit
590
+ # <tt>eta</tt> to 0.
591
+ #
592
+ # === {}[link:index.html"name="7.2] Coulomb Wave Function Normalization Constant
593
+ # ---
594
+ # * GSL::Sf::coulomb_CL_e(L, eta)
595
+ #
596
+ # This method computes the Coulomb wave function normalization
597
+ # constant C_L(eta) for L > -1.
598
+ # ---
599
+ # * GSL::Sf::gsl_sf_coulomb_CL_array(Lmin, kmax, eta)
600
+ #
601
+ # This method computes the coulomb wave function normalization constant
602
+ # C_L(eta) for L = Lmin ... Lmin + kmax, Lmin > -1.
603
+ #
604
+ # == {}[link:index.html"name="8] Coupling Coefficients
605
+ # The Wigner 3-j, 6-j and 9-j symbols give the coupling coefficients
606
+ # for combined angular momentum vectors. Since the arguments of the standard
607
+ # coupling coefficient functions are integer or half-integer, the arguments
608
+ # of the following functions are, by convention, integers equal to twice the
609
+ # actual spin value. For information on the 3-j coefficients
610
+ # see Abramowitz & Stegun, Section 27.9.
611
+ #
612
+ # ---
613
+ # * GSL::Sf::coupling_3j(two_ja, two_jb, two_jc, two_ma, two_mb, two_mc)
614
+ #
615
+ # Computes the Wigner 3-j coefficient,
616
+ # ja jb jc
617
+ # ma mb mc
618
+ # where the arguments are given in half-integer units,
619
+ # <tt>ja = two_ja/2, ma = two_ma/2</tt>, etc.
620
+ #
621
+ # ---
622
+ # * GSL::Sf::coupling_6j(two_ja, two_jb, two_jc, two_jd, two_je, two_jf)
623
+ #
624
+ # Computes the Wigner 6-j coefficient,
625
+ # ja jb jc
626
+ # jd je jf
627
+ # where the arguments are given in half-integer units,
628
+ # <tt>ja = two_ja/2, ma = two_ma/2</tt>, etc.
629
+ #
630
+ # ---
631
+ # * GSL::Sf::coupling_9j(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, two_jg, two_jh, two_ji)
632
+ #
633
+ # Computes the Wigner 9-j coefficient,
634
+ # ja jb jc
635
+ # jd je jf
636
+ # jg jh ji
637
+ # where the arguments are given in half-integer units,
638
+ # <tt>ja = two_ja/2, ma = two_ma/2</tt>, etc.
639
+ #
640
+ # == {}[link:index.html"name="9] Dawson Function
641
+ # The Dawson integral is defined by exp(-x^2) int_0^x dt exp(t^2).
642
+ # A table of Dawson's integral can be found in Abramowitz & Stegun, Table 7.5.
643
+ # ---
644
+ # * GSL::Sf::dawson(x)
645
+ #
646
+ # This method computes the value of Dawson's integral for <tt>x</tt>.
647
+ #
648
+ # == {}[link:index.html"name="10] Debye Functions
649
+ # The Debye functions are defined by the integral
650
+ # D_n(x) = n/x^n int_0^x dt (t^n/(e^t - 1)).
651
+ # For further information see Abramowitz & Stegun, Section 27.1.
652
+ # ---
653
+ # * GSL::Sf::debye_1(x)
654
+ # * GSL::Sf::debye_2(x)
655
+ # * GSL::Sf::debye_3(x)
656
+ # * GSL::Sf::debye_4(x)
657
+ #
658
+ # These methods Compute the n-th order Debye functions.
659
+ #
660
+ # == {}[link:index.html"name="11] Dilogarithm
661
+ # === {}[link:index.html"name="11.1] Real Argument
662
+ # ---
663
+ # * GSL::Sf::dilog(x)
664
+ #
665
+ # Computes the dilogarithm for a real argument. In Lewin's notation this
666
+ # is Li_2(x), the real part of the dilogarithm of a real <tt>x</tt>.
667
+ # It is defined by the integral representation
668
+ # Li_2(x) = - Re int_0^x ds log(1-s) / s.
669
+ # Note that Im(Li_2(x)) = 0 for x <= 1, and -pi log(x) for x > 1.
670
+ #
671
+ # === {}[link:index.html"name="11.2] Complex Argument
672
+ # ---
673
+ # * GSL::Sf::complex_dilog_e(r, theta)
674
+ #
675
+ # This method computes the full complex-valued dilogarithm for
676
+ # the complex argument z = r exp(i theta).
677
+ # The result is returned as an array of 2 elements, <tt>[re, im]</tt>,
678
+ # each of them is a <tt>GSL::Sf::Result</tt> object.
679
+ #
680
+ # == {}[link:index.html"name="12] Elementary Operations
681
+ # The following methods allow for the propagation of errors when
682
+ # combining quantities by multiplication.
683
+ # ---
684
+ # * GSL::Sf::multiply_e(x, y)
685
+ #
686
+ # This method multiplies <tt>x</tt> and <tt>y</tt> and returns
687
+ # the product as a <tt>GSL::Sf::Result</tt> object.
688
+ # ---
689
+ # * GSL::Sf::multiply_err_e(x, dx, y, dy)
690
+ #
691
+ # This method multiplies <tt>x</tt> and <tt>y</tt> with associated absolute
692
+ # errors <tt>dx</tt> and <tt>dy</tt>, and returns
693
+ # the product as a <tt>GSL::Sf::Result</tt> object.
694
+ #
695
+ # == {}[link:index.html"name="13] Elliptic Integrals
696
+ # === {}[link:index.html"name="13.1] Legendre Form of Complete Elliptic Integrals
697
+ # ---
698
+ # * GSL::Sf::ellint_Kcomp(k, mode = GSL::PREC_DOUBLE)
699
+ #
700
+ # Computes the complete elliptic integral K(k)
701
+ # to the accuracy specified by the mode variable <tt>mode</tt>.
702
+ # ---
703
+ # * GSL::Sf::ellint_Ecomp(k, mode = GSL::PREC_DOUBLE)
704
+ #
705
+ # Computes the complete elliptic integral E(k)
706
+ # to the accuracy specified by the mode variable <tt>mode</tt>.
707
+ # === {}[link:index.html"name="13.2] Legendre Form of Incomplete Elliptic Integrals
708
+ # ---
709
+ # * GSL::Sf::ellint_F(phi, k, mode = GSL::PREC_DOUBLE)
710
+ #
711
+ # Computes the incomplete elliptic integral E(phi, k)
712
+ # to the accuracy specified by the mode variable <tt>mode</tt>.
713
+ # ---
714
+ # * GSL::Sf::ellint_P(phi, k, n, mode = GSL::PREC_DOUBLE)
715
+ #
716
+ # Computes the incomplete elliptic integral P(phi, k, n)
717
+ # to the accuracy specified by the mode variable <tt>mode</tt>.
718
+ # ---
719
+ # * GSL::Sf::ellint_D(phi, k, n, mode = GSL::PREC_DOUBLE)
720
+ #
721
+ # Computes the incomplete elliptic integral D(phi, k, n)
722
+ # which is defined through the Carlson form RD(x, y, z) by the following relation,
723
+ # D(phi, k, n) = RD (1-sin^2(phi), 1-k^2 sin^2(phi), 1).
724
+ # === {}[link:index.html"name="13.3] Carlson Forms
725
+ # ---
726
+ # * GSL::Sf::ellint_RC(x, y, mode = GSL::PREC_DOUBLE)
727
+ #
728
+ # Computes the incomplete elliptic integral RC(x, y)
729
+ # to the accuracy specified by the mode variable <tt>mode</tt>.
730
+ # ---
731
+ # * GSL::Sf::ellint_RD(x, y, z, mode = GSL::PREC_DOUBLE)
732
+ #
733
+ # Computes the incomplete elliptic integral RD(x, y, z)
734
+ # to the accuracy specified by the mode variable <tt>mode</tt>.
735
+ # ---
736
+ # * GSL::Sf::ellint_RF(x, y, z, mode = GSL::PREC_DOUBLE)
737
+ #
738
+ # Computes the incomplete elliptic integral RF(x, y, z)
739
+ # to the accuracy specified by the mode variable <tt>mode</tt>.
740
+ # ---
741
+ # * GSL::Sf::ellint_RJ(x, y, z, p, mode = GSL::PREC_DOUBLE)
742
+ #
743
+ # Computes the incomplete elliptic integral RJ(x, y, z, p)
744
+ # to the accuracy specified by the mode variable <tt>mode</tt>.
745
+ #
746
+ # == {}[link:index.html"name="14] Elliptic Functions (Jacobi)
747
+ # ---
748
+ # * GSL::Sf::gsl_sf_elljac(u, m)
749
+ # * GSL::Sf::gsl_sf_elljac_e(u, m)
750
+ #
751
+ # These methods compute the Jacobian elliptic functions
752
+ # sn(u|m), cn(u|m), dn(u|m) by descending Landen transformations,
753
+ # and returns the result as an array of 3 elements.
754
+ #
755
+ # == {}[link:index.html"name="15] Error Functions
756
+ # ---
757
+ # * GSL::Sf::erf(x)
758
+ #
759
+ # Computes the error function erf(x) = (2/sqrt(pi)) int_0^x dt exp(-t^2).
760
+ # ---
761
+ # * GSL::Sf::erfc(x)
762
+ #
763
+ # Computes the complementary error function.
764
+ # ---
765
+ # * GSL::Sf::log_erfc(x)
766
+ #
767
+ # Computes the logarithm of the complementary error function log(erfc(x)).
768
+ # === {}[link:index.html"name="15.1] Probability functions
769
+ # ---
770
+ # * GSL::Sf::erf_Z(x)
771
+ #
772
+ # Computes the Gaussian probability density function
773
+ # Z(x) = (1/sqrt{2 pi}) exp(-x^2/2).
774
+ # ---
775
+ # * GSL::Sf::erf_Q(x)
776
+ #
777
+ # Computes the upper tail of the Gaussian probability function
778
+ # Q(x) = (1/sqrt{2 pi}) int_x^infty dt exp(-t^2/2).
779
+ # ---
780
+ # * GSL::Sf::hazard(x)
781
+ #
782
+ # The hazard function for the normal distribution, also known as
783
+ # the inverse Mill's ratio, is defined as
784
+ # h(x) = Z(x)/Q(x) = sqrt{2/pi exp(-x^2 / 2) / erfc(x/sqrt 2)}.
785
+ # It decreases rapidly as x approaches -infty and asymptotes to h(x) sim x
786
+ # as x approaches +infty.
787
+ #
788
+ # == {}[link:index.html"name="16] Exponential Functions
789
+ # ---
790
+ # * GSL::Sf::exp(x)
791
+ # * GSL::Sf::exp_e(x)
792
+ #
793
+ # These methods provide an exponential function exp(x)
794
+ # using GSL semantics and error checking.
795
+ # ---
796
+ # * GSL::Sf::exp_e10_e(x)
797
+ #
798
+ # This method computes the exponential exp(x) using the
799
+ # <tt>GSL::Sf::Result_e10</tt> type to return a result with extended range.
800
+ # This may be useful if the value of exp(x) would overflow the numeric
801
+ # range of <tt>double</tt>.
802
+ # ---
803
+ # * GSL::Sf::exp_mult(x, y)
804
+ # * GSL::Sf::exp_mult_e(x, y)
805
+ # * GSL::Sf::exp_mult_e10_e(x, y)
806
+ #
807
+ # Exponentiate <tt>x</tt> and multiply by the factor
808
+ # <tt>y</tt> to return the product y exp(x).
809
+ #
810
+ # === {}[link:index.html"name="16.1] Relative Exponential Functions
811
+ # ---
812
+ # * GSL::Sf::expm1(x)
813
+ #
814
+ # Computes the quantity exp(x)-1 using an algorithm that is
815
+ # accurate for small <tt>x</tt>.
816
+ # ---
817
+ # * GSL::Sf::exprel(x)
818
+ #
819
+ # Computes the quantity (exp(x)-1)/x using an algorithm that is
820
+ # accurate for small <tt>x</tt>. For small <tt>x</tt> the algorithm is
821
+ # based on the expansion
822
+ # (exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) + ... .
823
+ # ---
824
+ # * GSL::Sf::exprel_2(x)
825
+ #
826
+ # Computes the quantity 2(exp(x)-1-x)/x^2 using an algorithm that is
827
+ # accurate for small <tt>x</tt>. For small <tt>x</tt> the algorithm is based
828
+ # on the expansion
829
+ # 2(exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + ... .
830
+ # ---
831
+ # * GSL::Sf::exprel_n(n, x)
832
+ #
833
+ # Computes the N-relative exponential, which is the <tt>n</tt>-th
834
+ # generalization of the methods <tt>exprel</tt> and <tt>exprel2</tt>.
835
+ # The N-relative exponential is given by,
836
+ # exprel_N(x) = N!/x^N (exp(x) - sum_{k=0}^{N-1} x^k/k!)
837
+ # = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ...
838
+ # = 1F1 (1,1+N,x)
839
+ #
840
+ # === {}[link:index.html"name="16.2] Exponentiation With Error Estimate
841
+ # ---
842
+ # * GSL::Sf::exp_err_e(x, dx)
843
+ #
844
+ # Exponentiates <tt>x</tt> with an associated absolute error <tt>dx</tt>.
845
+ # ---
846
+ # * GSL::Sf::exp_err_e10_e(x, dx)
847
+ #
848
+ # Exponentiates a quantity <tt>x</tt> with an associated absolute error
849
+ # <tt>dx</tt> using the <tt>GSL::Sf::Result_e10</tt> type
850
+ # to return a result with extended range.
851
+ # ---
852
+ # * GSL::Sf::exp_mult_err_e(x, dx, y, dy)
853
+ #
854
+ # Computes the product y exp(x) for the quantities <tt>x, y</tt>
855
+ # with associated absolute errors <tt>dx, dy</tt>.
856
+ # ---
857
+ # * GSL::Sf::exp_mult_err_e10_e(x, dx, y, dy)
858
+ #
859
+ # Computes the product y exp(x) for the quantities <tt>x, y</tt>
860
+ # with associated absolute errors <tt>dx, dy</tt> using the
861
+ # <tt>GSL::Sf::Result_e10</tt> type to return a result with extended range.
862
+ #
863
+ # == {}[link:index.html"name="17] Exponential Integrals
864
+ # === {}[link:index.html"name="17.1] Exponential Integral
865
+ # ---
866
+ # * GSL::Sf::expint_E1(x)
867
+ #
868
+ # Computes the exponential integral E_1(x),
869
+ # E_1(x) := int_1^infty dt exp(-xt)/t.
870
+ # ---
871
+ # * GSL::Sf::expint_E2(x)
872
+ #
873
+ # Computes the second-order exponential integral E_2(x),
874
+ # E_2(x) := int_1^infty dt exp(-xt)/t^2.
875
+ # ---
876
+ # * GSL::Sf::expint_En(n, x)
877
+ #
878
+ # Computes the exponential integral E_n(n, x) of order <tt>n</tt>. (>= GSL-1.10)
879
+ #
880
+ # === {}[link:index.html"name="17.2] Ei(x)
881
+ # ---
882
+ # * GSL::Sf::expint_Ei(x)
883
+ #
884
+ # Computes the exponential integral E_i(x),
885
+ # Ei(x) := - PV(int_{-x}^infty dt exp(-t)/t)
886
+ # where PV denotes the principal value of the integral.
887
+ # === {}[link:index.html"name="17.3] Hyperbolic Integrals
888
+ # ---
889
+ # * GSL::Sf::Shi(x)
890
+ #
891
+ # Computes the integral Shi(x) = int_0^x dt sinh(t)/t.
892
+ # ---
893
+ # * GSL::Sf::Chi(x)
894
+ #
895
+ # Computes the integral
896
+ # Chi(x) := Re[ gamma_E + log(x) + int_0^x dt (cosh[t]-1)/t] ,
897
+ # where gamma_E is the Euler constant
898
+ # (available as the constant <tt>GSL::M_EULER</tt>).
899
+ # === {}[link:index.html"name="17.4] Ei_3(x)
900
+ # ---
901
+ # * GSL::Sf::expint_3(x)
902
+ #
903
+ # Computes the exponential integral Ei_3(x) = int_0^x dt exp(-t^3) for x >= 0
904
+ # === {}[link:index.html"name="17.5] Trigonometric Integrals
905
+ # ---
906
+ # * GSL::Sf::Si(x)
907
+ #
908
+ # Computes the Sine integral Si(x) = int_0^x dt sin(t)/t.
909
+ # ---
910
+ # * GSL::Sf::Ci(x)
911
+ #
912
+ # Computes the Cosine integral Ci(x) = -int_x^infty dt cos(t)/t for x > 0.
913
+ # === {}[link:index.html"name="17.6] Arctangent Integral
914
+ # ---
915
+ # * GSL::Sf::atanint(x)
916
+ #
917
+ # Computes the Arctangent integral AtanInt(x) = int_0^x dt arctan(t)/t.
918
+ #
919
+ # == {}[link:index.html"name="18] Fermi-Dirac Functions
920
+ # === {}[link:index.html"name="18.1] Complete Fermi-Dirac Integrals
921
+ # The complete Fermi-Dirac integral F_j(x) is given by,
922
+ # F_j(x) := (1/r Gamma(j+1)) int_0^infty dt (t^j / (exp(t-x) + 1))
923
+ #
924
+ # ---
925
+ # * GSL::Sf::fermi_dirac_m1(x)
926
+ #
927
+ # Computes the complete Fermi-Dirac integral with an index of -1.
928
+ # This integral is given by F_{-1}(x) = e^x / (1 + e^x).
929
+ # ---
930
+ # * GSL::Sf::fermi_dirac_0(x)
931
+ #
932
+ # Computes the complete Fermi-Dirac integral with an index of 0. This
933
+ # integral is given by F_0(x) = ln(1 + e^x).
934
+ # ---
935
+ # * GSL::Sf::fermi_dirac_1(x)
936
+ #
937
+ # Compute the complete Fermi-Dirac integral with an index of 1,
938
+ # F_1(x) = int_0^infty dt (t /(exp(t-x)+1)).
939
+ # ---
940
+ # * GSL::Sf::fermi_dirac_2(x)
941
+ #
942
+ # Computes the complete Fermi-Dirac integral with an index of 2,
943
+ # F_2(x) = (1/2) int_0^infty dt (t^2 /(exp(t-x)+1)).
944
+ # ---
945
+ # * GSL::Sf::fermi_dirac_int(j, x)
946
+ #
947
+ # Computes the complete Fermi-Dirac integral with an integer index of
948
+ # <tt>j</tt>, F_j(x) = (1/Gamma(j+1)) int_0^infty dt (t^j /(exp(t-x)+1)).
949
+ # ---
950
+ # * GSL::Sf::fermi_dirac_mhalf(x)
951
+ #
952
+ # Computes the complete Fermi-Dirac integral F_{-1/2}(x).
953
+ # ---
954
+ # * GSL::Sf::fermi_dirac_half(x)
955
+ #
956
+ # Computes the complete Fermi-Dirac integral F_{1/2}(x).
957
+ # ---
958
+ # * GSL::Sf::fermi_dirac_3half(x)
959
+ #
960
+ # Computes the complete Fermi-Dirac integral F_{3/2}(x).
961
+ # === {}[link:index.html"name="18.2] Incomplete Fermi-Dirac Integrals
962
+ # ---
963
+ # * GSL::Sf::fermi_dirac_inc_0(x, b)
964
+ #
965
+ # Computes the incomplete Fermi-Dirac integral with an index of zero,
966
+ # F_0(x,b) = ln(1 + e^{b-x}) - (b-x).
967
+ #
968
+ # == {}[link:index.html"name="19] Gamma Function
969
+ # The Gamma function is defined by the following integral,
970
+ # Gamma(x) = int_0^infty dt t^{x-1} exp(-t)
971
+ # Further information on the Gamma function can be found in
972
+ # Abramowitz & Stegun, Chapter 6.
973
+ #
974
+ # ---
975
+ # * GSL::Sf::gamma(x)
976
+ #
977
+ # Computes the Gamma function, subject to <tt>x</tt> not being a
978
+ # negative integer. The function is computed using the real
979
+ # Lanczos method. The maximum value of <tt>x</tt> such that Gamma(x) is
980
+ # not considered an overflow is given by the constant
981
+ # <tt>GSL::Sf::GAMMA_XMAX</tt> and is 171.0.
982
+ # ---
983
+ # * GSL::Sf::lngamma(x)
984
+ #
985
+ # Computes the logarithm of the Gamma function, log(Gamma(x)),
986
+ # subject to <tt>x</tt> not a being negative integer.
987
+ # For x<0 the real part of log(Gamma(x)) is returned,
988
+ # which is equivalent to log(|Gamma(x)|).
989
+ # The function is computed using the real Lanczos method.
990
+ # ---
991
+ # * GSL::Sf::lngamma_sgn_e(x)
992
+ #
993
+ # Computes the sign of the gamma function and the logarithm its magnitude,
994
+ # subject to <tt>x</tt> not being a negative integer, and returns the result
995
+ # as an array of 2 elements, <tt>[result, sng]</tt>. The function is computed
996
+ # using the real Lanczos method. The value of the gamma function can be
997
+ # reconstructed using the relation Gamma(x) = sgn * exp(result).
998
+ # ---
999
+ # * GSL::Sf::gammastar(x)
1000
+ #
1001
+ # Computes the regulated Gamma Function Gamma^*(x) for x > 0.
1002
+ # The regulated gamma function is given by,
1003
+ # Gamma^*(x) = Gamma(x)/(sqrt{2 pi} x^{(x-1/2)} exp(-x))
1004
+ # = (1 + (1/12x) + ...) for x -> infty
1005
+ # and is a useful suggestion of Temme.
1006
+ # ---
1007
+ # * GSL::Sf::gammainv(x)
1008
+ #
1009
+ # Computes the reciprocal of the gamma function, 1/Gamma(x) using the real Lanczos method.
1010
+ # ---
1011
+ # * GSL::Sf::ngamma_complex_e(zr, zi)
1012
+ #
1013
+ # These method compute log(Gamma(z)) for complex z = zr + i zi and z not a
1014
+ # negative integer,
1015
+ # using the complex Lanczos method. The result is returned as an array of
1016
+ # 2 elements, <tt>[lnr, arg, status]</tt>, where lnr = log|Gamma(z)| and arg = arg(Gamma(z))
1017
+ # in (-pi,pi]. Note that the phase part (arg) is not well-determined when
1018
+ # |z| is very large, due to inevitable roundoff in restricting to (-pi,pi].
1019
+ # This will result in a <tt>GSL::ELOSS</tt> error when it occurs.
1020
+ # The absolute value part (lnr), however, never suffers from loss of precision.
1021
+ # ---
1022
+ # * GSL::Sf::taylorcoeff(n, x)
1023
+ #
1024
+ # Computes the Taylor coefficient x^n / n! for x >= 0, n >= 0.
1025
+ # ---
1026
+ # * GSL::Sf::fact(n)
1027
+ #
1028
+ # Computes the factorial n!. The factorial is related to the
1029
+ # Gamma function by n! = Gamma(n+1).
1030
+ # ---
1031
+ # * GSL::Sf::doublefact(n)
1032
+ #
1033
+ # Computes the double factorial n!! = n(n-2)(n-4)... .
1034
+ # ---
1035
+ # * GSL::Sf::lnfact(n)
1036
+ #
1037
+ # Computes the logarithm of the factorial of <tt>n</tt>, log(n!).
1038
+ # The algorithm is faster than computing ln(Gamma(n+1)) via
1039
+ # <tt>GSL::Sf::lngamma</tt> for n < 170, but defers for larger n.
1040
+ # ---
1041
+ # * GSL::Sf::lndoublefact(n)
1042
+ #
1043
+ # Computes the logarithm of the double factorial of n, log(n!!).
1044
+ # ---
1045
+ # * GSL::Sf::choose(n, m)
1046
+ #
1047
+ # Computes the combinatorial factor n choose m = n!/(m!(n-m)!).
1048
+ # ---
1049
+ # * GSL::Sf::lnchoose(n, m)
1050
+ #
1051
+ # Computes the logarithm of n choose m.
1052
+ # This is equivalent to the sum log(n!) - log(m!) - log((n-m)!).
1053
+ # ---
1054
+ # * GSL::Sf::poch(a, x)
1055
+ #
1056
+ # Computes the Pochhammer symbol (a)_x := Gamma(a + x)/Gamma(a),
1057
+ # subject to <tt>a</tt> and <tt>a+x</tt> not being negative integers.
1058
+ # The Pochhammer symbol is also known as the Apell symbol.
1059
+ # ---
1060
+ # * GSL::Sf::lnpoch(a, x)
1061
+ #
1062
+ # Computes the logarithm of the Pochhammer symbol,
1063
+ # log((a)_x) = log(Gamma(a + x)/Gamma(a)) for a > 0, a+x > 0.
1064
+ # ---
1065
+ # * GSL::Sf::lnpoch_sgn_e(a, x)
1066
+ #
1067
+ # Computes the sign of the Pochhammer symbol and the logarithm of its magnitude,
1068
+ # subject to a, a+x not being negative integers.
1069
+ # The result is returned as an array of 2 elements, <tt>[result, sng]</tt>,
1070
+ # where result = log(|(a)_x|), sgn = sgn((a)_x), and
1071
+ # (a)_x := Gamma(a + x)/Gamma(a).
1072
+ # ---
1073
+ # * GSL::Sf::pochrel(a, x)
1074
+ #
1075
+ # Computes the relative Pochhammer symbol ((a,x) - 1)/x
1076
+ # where (a,x) = (a)_x := Gamma(a + x)/Gamma(a).
1077
+ # ---
1078
+ # * GSL::Sf::gamma_inc_Q(a, x)
1079
+ #
1080
+ # Computes the normalized incomplete Gamma Function
1081
+ # Q(a,x) = 1/Gamma(a) int_x^infty dt t^{a-1} exp(-t) for a > 0, x >= 0.
1082
+ # ---
1083
+ # * GSL::Sf::gamma_inc_P(a, x)
1084
+ #
1085
+ # Computes the complementary normalized incomplete Gamma Function
1086
+ # P(a,x) = 1/Gamma(a) int_0^x dt t^{a-1} exp(-t) for a > 0, x >= 0.
1087
+ # Note that Abramowitz & Stegun call P(a,x) the incomplete gamma function (section 6.5).
1088
+ # ---
1089
+ # * GSL::Sf::gamma_inc(a, x)
1090
+ #
1091
+ # Computes the incomplete Gamma Function the normalization factor included
1092
+ # in the previously defined functions:
1093
+ # Gamma(a,x) = int_x^infty dt t^{a-1} exp(-t) for a real and x >= 0.
1094
+ # ---
1095
+ # * GSL::Sf::beta(a, b)
1096
+ #
1097
+ # Computes the Beta Function, B(a,b) = Gamma(a)Gamma(b)/Gamma(a+b) for a > 0, b > 0.
1098
+ # ---
1099
+ # * GSL::Sf::lnbeta(a, b)
1100
+ #
1101
+ # Computes the logarithm of the Beta Function, log(B(a,b)) for a > 0, b > 0.
1102
+ # ---
1103
+ # * GSL::Sf::beta_inc(a, b, x)
1104
+ #
1105
+ # Computes the normalize incomplete Beta function
1106
+ # B_x(a,b)/B(a,b) for a > 0, b > 0, and 0 <= x <= 1.
1107
+ #
1108
+ # == {}[link:index.html"name="20] Gegenbauer Functions
1109
+ # ---
1110
+ # * GSL::Sf::gegenpoly_1(lambda, x)
1111
+ # * GSL::Sf::gegenpoly_2(lambda, x)
1112
+ # * GSL::Sf::gegenpoly_3(lambda, x)
1113
+ #
1114
+ # These methods evaluate the Gegenbauer polynomials
1115
+ # C^{(lambda)}_n(x) using explicit representations for n =1, 2, 3.
1116
+ # ---
1117
+ # * GSL::Sf::gegenpoly_n(n, lambda, x)
1118
+ #
1119
+ # This evaluates the Gegenbauer polynomial
1120
+ # C^{(lambda)}_n(x) for a specific value of <tt>n, lambda, x</tt>
1121
+ # subject to lambda > -1/2, n >= 0.
1122
+ # ---
1123
+ # * GSL::Sf::gegenpoly_array(nmax, lambda, x)
1124
+ #
1125
+ # This method computes Gegenbauer polynomials C^{(lambda)}_n(x)
1126
+ # for n = 0, 1, 2, ..., nmax, subject to lambda > -1/2, nmax >= 0.
1127
+ # The result is returned as a <tt>GSL::Vector</tt> object.
1128
+ #
1129
+ # == {}[link:index.html"name="21] Hypergeometric Functions
1130
+ # ---
1131
+ # * GSL::Sf::hyperg_0F1(c, x)
1132
+ #
1133
+ # Computes the hypergeometric function 0F1(c, x).
1134
+ # ---
1135
+ # * GSL::Sf::hyperg_1F1_int(m, n, x)
1136
+ #
1137
+ # Computes the confluent hypergeometric function 1F1(m,n,x) = M(m,n,x)
1138
+ # for integer parameters <tt>m, n</tt>.
1139
+ # ---
1140
+ # * GSL::Sf::hyperg_1F1(a, b, x)
1141
+ #
1142
+ # Computes the confluent hypergeometric function 1F1(a,b,x) = M(a,b,x)
1143
+ # for general parameters <tt>a, b</tt>.
1144
+ # ---
1145
+ # * GSL::Sf::hyperg_U_int(m, n, x)
1146
+ #
1147
+ # Computes the confluent hypergeometric function U(m,n,x) for integer parameters
1148
+ # <tt>m, n</tt>.
1149
+ # ---
1150
+ # * GSL::Sf::hyperg_U_int_e10_e(m, n, x)
1151
+ #
1152
+ # Computes the confluent hypergeometric function U(m,n,x)
1153
+ # for integer parameters <tt>m, n</tt> using the <tt>GSL::Sf::Result_e10</tt>
1154
+ # type to return a result with extended range.
1155
+ # ---
1156
+ # * GSL::Sf::hyperg_U(a, b, x)
1157
+ #
1158
+ # Computes the confluent hypergeometric function U(a,b,x).
1159
+ # ---
1160
+ # * GSL::Sf::hyperg_U_e10_e(a, b, x)
1161
+ #
1162
+ # Computes the confluent hypergeometric function U(a,b,x)
1163
+ # using the <tt>GSL::Sf::Result_e10</tt> type to return a result with extended range.
1164
+ # ---
1165
+ # * GSL::Sf::hyperg_2F1(a, b, c, x)
1166
+ # * GSL::Sf::hyperg_2F1_e(a, b, c, x)
1167
+ #
1168
+ # These methods compute the Gauss hypergeometric function 2F1(a,b,c,x) for |x| < 1.
1169
+ # If the arguments (a,b,c,x) are too close to a singularity then the
1170
+ # function can return the error code <tt>GSL::EMAXITER</tt> when the series
1171
+ # approximation converges too slowly. This occurs in the region of
1172
+ # x=1, c - a - b = m for integer m.
1173
+ # ---
1174
+ # * GSL::Sf::hyperg_2F1_conj(aR, aI, c, x)
1175
+ #
1176
+ # Computes the Gauss hypergeometric function 2F1(a_R + i a_I, a_R - i a_I, c, x)
1177
+ # with complex parameters for |x| < 1.
1178
+ # ---
1179
+ # * GSL::Sf::hyperg_2F1_renorm(a, b, c, x)
1180
+ #
1181
+ # Computes the renormalized Gauss hypergeometric function
1182
+ # 2F1(a,b,c,x) / Gamma(c) for |x| < 1.
1183
+ # ---
1184
+ # * GSL::Sf::hyperg_2F1_renorm(aR, aI, c, x)
1185
+ #
1186
+ # Computes the renormalized Gauss hypergeometric function
1187
+ # 2F1(a_R + i a_I, a_R - i a_I, c, x) / Gamma(c) for |x| < 1.
1188
+ # ---
1189
+ # * GSL::Sf::hyperg_2F0(a, b, x)
1190
+ #
1191
+ # Computes the hypergeometric function 2F0(a,b,x).
1192
+ # The series representation is a divergent hypergeometric series.
1193
+ # However, for x < 0 we have 2F0(a,b,x) = (-1/x)^a U(a,1+a-b,-1/x).
1194
+ #
1195
+ # == {}[link:index.html"name="22] Laguerre Functions
1196
+ # The Laguerre polynomials are defined in terms of confluent hypergeometric
1197
+ # functions as L^a_n(x) = ((a+1)_n / n!) 1F1(-n,a+1,x).
1198
+ # ---
1199
+ # * GSL::Sf::laguerre_1(a, x)
1200
+ # * GSL::Sf::laguerre_2(a, x)
1201
+ # * GSL::Sf::laguerre_3(a, x)
1202
+ #
1203
+ # These methods evaluate the generalized Laguerre polynomials
1204
+ # L^a_1(x), L^a_2(x), L^a_3(x) using explicit representations.
1205
+ # ---
1206
+ # * GSL::Sf::laguerre_n(n, a, x)
1207
+ #
1208
+ # This evaluates the generalized Laguerre polynomials L^a_n(x) for a > -1, n >= 0.
1209
+ #
1210
+ # == {}[link:index.html"name="23] Lambert W Functions
1211
+ # Lambert's W functions, W(x), are defined to be solutions of the equation
1212
+ # W(x) exp(W(x)) = x. This function has multiple branches for x < 0;
1213
+ # however, it has only two real-valued branches.
1214
+ # We define W_0(x) to be the principal branch,
1215
+ # where W > -1 for x < 0, and W_{-1}(x) to be the other real branch, where W < -1 for x < 0.
1216
+ #
1217
+ # ---
1218
+ # * GSL::Sf::lambert_W0(x)
1219
+ #
1220
+ # This computes the principal branch of the Lambert W function, W_0(x).
1221
+ # ---
1222
+ # * GSL::Sf::lambert_Wm1(x)
1223
+ #
1224
+ # This computes the secondary real-valued branch of the Lambert W function, W_{-1}(x).
1225
+ #
1226
+ # == {}[link:index.html"name="24] Legendre Functions and Spherical Harmonics
1227
+ # === {}[link:index.html"name="24.1] Legendre Polynomials
1228
+ # ---
1229
+ # * GSL::Sf::legendre_P1(x)
1230
+ # * GSL::Sf::legendre_P2(x)
1231
+ # * GSL::Sf::legendre_P3(x)
1232
+ #
1233
+ # These methods evaluate the Legendre polynomials P_l(x) using explicit
1234
+ # representations for l=1, 2, 3.
1235
+ # ---
1236
+ # * GSL::Sf::legendre_Pl(l, x)
1237
+ #
1238
+ # This evaluates the Legendre polynomial P_l(x) for a specific value of <tt>l, x</tt>,
1239
+ # subject to l >= 0, |x| <= 1.
1240
+ # ---
1241
+ # * GSL::Sf::legendre_Pl_array(lmax, x)
1242
+ #
1243
+ # This function computes Legendre polynomials P_l(x) for l = 0, ..., lmax,
1244
+ # and returns the result as a <tt>GSL::Vector</tt> object.
1245
+ # ---
1246
+ # * GSL::Sf::legendre_Q0(x)
1247
+ #
1248
+ # This computes the Legendre function Q_0(x) for x > -1, x != 1.
1249
+ # ---
1250
+ # * GSL::Sf::legendre_Q1(x)
1251
+ #
1252
+ # This computes the Legendre function Q_1(x) for x > -1, x != 1.
1253
+ # ---
1254
+ # * GSL::Sf::legendre_Ql(l, x)
1255
+ #
1256
+ # This computes the Legendre function Q_l(x) for x > -1, x != 1 and l >= 0.
1257
+ #
1258
+ # === {}[link:index.html"name="24.2] Associated Legendre Polynomials and Spherical Harmonics
1259
+ # The following functions compute the associated Legendre Polynomials P_l^m(x).
1260
+ # Note that this function grows combinatorially with <tt>l</tt> and can overflow for
1261
+ # <tt>l</tt> larger than about 150. There is no trouble for small <tt>m</tt>,
1262
+ # but overflow occurs when <tt>m</tt> and <tt>l</tt> are both large.
1263
+ # Rather than allow overflows, these functions refuse to calculate P_l^m(x)
1264
+ # and return <tt>GSL::EOVRFLW</tt> when they can sense that <tt>l</tt> and <tt>m</tt> are too big.
1265
+ # If you want to calculate a spherical harmonic, then do not use these functions.
1266
+ # Instead use <tt>GSL::Sf::legendre_sphPlm()</tt> below,
1267
+ # which uses a similar recursion, but with the normalized functions.
1268
+ #
1269
+ # ---
1270
+ # * GSL::Sf::legendre_Plm(l, m, x)
1271
+ # * GSL::Sf::legendre_Plm_e(l, m, x)
1272
+ #
1273
+ # These methods compute the associated Legendre polynomial
1274
+ # P_l^m(x) for m >= 0, l >= m, |x| <= 1.
1275
+ # ---
1276
+ # * GSL::Sf::legendre_Plm_array(lmax, m, x)
1277
+ #
1278
+ # This method computes Legendre polynomials P_l^m(x) for m >= 0, l = |m|, ..., lmax,
1279
+ # |x| <= 1, and returns the result as a <tt>GSL::Vector</tt> object.
1280
+ # ---
1281
+ # * GSL::Sf::legendre_sphPlm(l, m, x)
1282
+ # * GSL::Sf::legendre_sphPlm_e(l, m, x)
1283
+ #
1284
+ # These methods compute the normalized associated Legendre polynomial
1285
+ # sqrt{(2l+1)/(4pi)} sqrt{(l-m)!/(l+m)!} P_l^m(x)
1286
+ # suitable for use in spherical harmonics. The parameters must satisfy
1287
+ # m >= 0, l >= m, |x| <= 1. Theses routines avoid the overflows that
1288
+ # occur for the standard normalization of P_l^m(x).
1289
+ # ---
1290
+ # * GSL::Sf::legendre_sphPlm_array(lmax, m, x)
1291
+ #
1292
+ # This method computes an array of normalized associated Legendre functions
1293
+ # sqrt{(2l+1)/(4pi)} sqrt{(l-m)!/(l+m)!} P_l^m(x)$ for m >= 0, l = |m|, ..., lmax,
1294
+ # |x| <= 1.0, and returns the result as a <tt>GSL::Vector</tt> object.
1295
+ # ---
1296
+ # * GSL::Sf::legendre_array_size(lmax, m)
1297
+ #
1298
+ # This returns the size of resulting array needed for the array versions
1299
+ # of P_l^m(x), lmax - m + 1.
1300
+ #
1301
+ # === {}[link:index.html"name="24.3] Conical Functions
1302
+ # The Conical Functions P^mu_{-(1/2)+i lambda}(x), Q^mu_{-(1/2)+i lambda}
1303
+ # are described in Abramowitz & Stegun, Section 8.12.
1304
+ #
1305
+ # ---
1306
+ # * GSL::Sf::conicalP_half(lambda, x)
1307
+ #
1308
+ # Computes the irregular Spherical Conical Function
1309
+ # P^{1/2}_{-1/2 + i lambda}(x) for x > -1.
1310
+ # ---
1311
+ # * GSL::Sf::conicalP_mhalf(lambda, x)
1312
+ #
1313
+ # Computes the regular Spherical Conical Function
1314
+ # P^{-1/2}_{-1/2 + i lambda}(x) for x > -1.
1315
+ # ---
1316
+ # * GSL::Sf::conicalP_0(lambda, x)
1317
+ # * GSL::Sf::conicalP_1(lambda, x)
1318
+ #
1319
+ # These methods compute the conical function P^0_{-1/2 + i lambda}(x),
1320
+ # P^1_{-1/2 + i lambda}(x)for x > -1.
1321
+ # ---
1322
+ # * GSL::Sf::conicalP_sph_reg(l, lambda, x)
1323
+ #
1324
+ # Computes the Regular Spherical Conical Function
1325
+ # P^{-1/2-l}_{-1/2 + i lambda}(x) for x > -1, l >= -1.
1326
+ # ---
1327
+ # * GSL::Sf::conicalP_cyc_reg(m, lambda, x)
1328
+ #
1329
+ # Computes the Regular Cylindrical Conical Function
1330
+ # P^{-m}_{-1/2 + i lambda}(x) for x > -1, m >= -1.
1331
+ #
1332
+ # === {}[link:index.html"name="24.4] Radial Functions for Hyperbolic Space
1333
+ # The following spherical functions are specializations of Legendre functions which
1334
+ # give the regular eigenfunctions of the Laplacian on a 3-dimensional hyperbolic space
1335
+ # H3d. Of particular interest is the flat limit, lambda to infty, eta to 0, lambda eta fixed.
1336
+ # ---
1337
+ # * GSL::Sf::legendre_H3d_0(lambda, eta)
1338
+ #
1339
+ # Computes the zeroth radial eigenfunction of the Laplacian on the 3-dimensional
1340
+ # hyperbolic space, L^{H3d}_0(lambda,eta) := sin(lambda eta)/(lambda sinh(eta))
1341
+ # for eta >= 0. In the flat limit this takes the form
1342
+ # L^{H3d}_0(lambda, eta) = j_0( lambda eta).
1343
+ # ---
1344
+ # * GSL::Sf::legendre_H3d_1(lambda, eta)
1345
+ #
1346
+ # Computes the first radial eigenfunction of the Laplacian on the 3-dimensional
1347
+ # hyperbolic space,
1348
+ # L^{H3d}_1(lambda, eta) := 1/sqrt{lambda^2 + 1} sin(lambda eta)/(lambda sinh(eta)) (coth(eta) - lambda cot(lambda eta)) for eta >= 0.
1349
+ # In the flat limit this takes the form L^{H3d}_1(lambda, eta) = j_1( lambda eta).
1350
+ # ---
1351
+ # * GSL::Sf::legendre_H3d(l, lambda, eta)
1352
+ #
1353
+ # Computes the <tt>l</tt>-th radial eigenfunction of the Laplacian on the
1354
+ # 3-dimensional hyperbolic space eta >= 0, l >= 0.
1355
+ # In the flat limit this takes the form L^{H3d}_l(lambda, eta) = j_l(lambda eta).
1356
+ # ---
1357
+ # * GSL::Sf::legendre_H3d_array(lmax, lambda, eta)
1358
+ #
1359
+ # This method computes radial eigenfunctions L^{H3d}_l(lambda, eta) for 0 <= l <= lmax,
1360
+ # and returns the result as a <tt>GSL::Vector</tt> object.
1361
+ #
1362
+ # == {}[link:index.html"name="25] Logarithm and Related Functions
1363
+ # ---
1364
+ # * GSL::Sf::log(x)
1365
+ #
1366
+ # Computes the logarithm of <tt>x</tt>, log(x), for x > 0.
1367
+ # ---
1368
+ # * GSL::Sf::log_abs(x)
1369
+ #
1370
+ # Computes the logarithm of the magnitude of <tt>x</tt>, log(|x|), for x != 0.
1371
+ # ---
1372
+ # * GSL::Sf::complex_log_e(zr, zi)
1373
+ # * GSL::Sf::complex_log_e(z)
1374
+ #
1375
+ # This method computes the complex logarithm of z = z_r + i z_i.
1376
+ # The results are returned as an array <tt>[lnr, theta]</tt> such that
1377
+ # exp(lnr + i theta) = z_r + i z_i, where theta lies in the range [-pi, pi].
1378
+ # ---
1379
+ # * GSL::Sf::log_1plusx(x)
1380
+ #
1381
+ # Computes log(1 + x) for x > -1 using an algorithm that is accurate for small x.
1382
+ # ---
1383
+ # * GSL::Sf::log_1plusx_mx(x)
1384
+ #
1385
+ # Computes log(1 + x) - x for x > -1 using an algorithm that is accurate for small x.
1386
+ #
1387
+ # == {}[link:index.html"name="26] Mathieu functions
1388
+ # The methods described in this section compute the angular and radial Mathieu functions, and their characteristic values. Mathieu functions are the solutions of the following two differential equations: The angular Mathieu functions ce_r(x,q), se_r(x,q) are the even and odd periodic solutions of the first equation, which is known as Mathieu's equation. These exist only for the discrete sequence of characteristic values a=a_r(q) (even-periodic) and a=b_r(q) (odd-periodic).
1389
+ #
1390
+ # The radial Mathieu functions Mc^{(j)}_{r}(z,q), Ms^{(j)}_{r}(z,q) are the solutions of the second equation, which is referred to as Mathieu's modified equation. The radial Mathieu functions of the first, second, third and fourth kind are denoted by the parameter <tt>j</tt>, which takes the value 1, 2, 3 or 4.
1391
+ #
1392
+ # For more information on the Mathieu functions, see Abramowitz and Stegun, Chapter 20.
1393
+ #
1394
+ # === {}[link:index.html"name="26.1] Mathieu Function Workspace
1395
+ # The Mathieu functions can be computed for a single order or for multiple orders, using array-based routines.
1396
+ # ---
1397
+ # * GSL::Sf::Mathieu.alloc(n, qmax)
1398
+ #
1399
+ # This method returns a workspace for the array versions of the Mathieu routines. The arguments <tt>n</tt> and <tt>qmax</tt> specify the maximum order and q-value of Mathieu functions which can be computed with this workspace.
1400
+ #
1401
+ # === {}[link:index.html"name="26.2] Mathieu Function Characteristic Values
1402
+ # ---
1403
+ # * GSL::Sf::mathieu_a(n, q)
1404
+ # * GSL::Sf::mathieu_a_e(n, q)
1405
+ # * GSL::Sf::mathieu_b(n, q)
1406
+ # * GSL::Sf::mathieu_b_e(n, q)
1407
+ #
1408
+ # These methodss compute the characteristic values a_n(q), b_n(q) of the Mathieu functions ce_n(q,x) and se_n(q,x), respectively.
1409
+ #
1410
+ # ---
1411
+ # * GSL::Sf::mathieu_a_array(nmin, nmax, q, work)
1412
+ # * GSL::Sf::mathieu_b_array(nminm nmax, q, work)
1413
+ #
1414
+ # These methods compute a series of Mathieu characteristic values a_n(q), b_n(q) for n from <tt>nmin</tt> to <tt>nmax</tt> inclusive, and return the results as a <tt>GSL::Vector</tt> object.
1415
+ #
1416
+ # === {}[link:index.html"name="26.3] Angular Mathieu Functions
1417
+ # ---
1418
+ # * GSL::Sf::mathieu_ce(n, q, x)
1419
+ # * GSL::Sf::mathieu_ce_e(n, q, x)
1420
+ # * GSL::Sf::mathieu_se(n, q, x)
1421
+ # * GSL::Sf::mathieu_se_e(n, q, x)
1422
+ #
1423
+ # These methods compute the angular Mathieu functions ce_n(q,x) and se_n(q,x), respectively.
1424
+ #
1425
+ # ---
1426
+ # * GSL::Sf::mathieu_ce_array(nmin, nmax, q, x, work)
1427
+ # * GSL::Sf::mathieu_se_array(nmin, nmax, q, x, work)
1428
+ #
1429
+ # These methods compute a series of the angular Mathieu functions ce_n(q,x) and se_n(q,x) of order n from <tt>nmin</tt> to <tt>nmax</tt> inclusive, and return the results as a <tt>GSL::Vector</tt> object.
1430
+ #
1431
+ # === {}[link:index.html"name="26.4] Radial Mathieu Functions
1432
+ # ---
1433
+ # * GSL::Sf::mathieu_Mc(j, n, q, x)
1434
+ # * GSL::Sf::mathieu_Mc_e(j, n, q, x)
1435
+ # * GSL::Sf::mathieu_Ms(j, n, q, x)
1436
+ # * GSL::Sf::mathieu_Ms_e(j, n, q, x)
1437
+ #
1438
+ # These methods compute the radial <tt>j</tt>-th kind Mathieu functions Mc_n^{(j)}(q,x) and Ms_n^{(j)}(q,x) of order <tt>n</tt>.
1439
+ #
1440
+ # The allowed values of <tt>j</tt> are 1 and 2. The functions for <tt>j = 3,4</tt> can be computed as M_n^{(3)} = M_n^{(1)} + iM_n^{(2)} and M_n^{(4)} = M_n^{(1)} - iM_n^{(2)}, where M_n^{(j)} = Mc_n^{(j)} or Ms_n^{(j)}.
1441
+ #
1442
+ # ---
1443
+ # * GSL::Sf::mathieu_Mc_array(j, nmin, nmax, q, x, work)
1444
+ # * GSL::Sf::mathieu_Ms_array(j, nmin, nmax, q, x, work)
1445
+ #
1446
+ # These methods compute a series of the radial Mathieu functions of kind <tt>j</tt>, with order from <tt>nmin</tt> to <tt>nmax</tt> inclusive, and return the results as a <tt>GSL::Vector</tt> object.
1447
+ #
1448
+ # == {}[link:index.html"name="27] Power Functions
1449
+ # ---
1450
+ # * GSL::Sf::pow_int(x, n)
1451
+ # * GSL::Sf::pow_int_e(x, n)
1452
+ #
1453
+ # These methods compute the power x^n for integer n. The power is computed using
1454
+ # the minimum number of multiplications. For example, x^8 is computed as
1455
+ # ((x^2)^2)^2, requiring only 3 multiplications. For reasons of efficiency,
1456
+ # these functions do not check for overflow or underflow conditions.
1457
+ #
1458
+ # == {}[link:index.html"name="28] Psi (Digamma) Function
1459
+ # The polygamma functions of order <tt>m</tt> defined by
1460
+ # psi^{(m)}(x) = (d/dx)^m psi(x) = (d/dx)^{m+1} log(Gamma(x)),
1461
+ # where psi(x) = Gamma'(x)/Gamma(x) is known as the digamma function.
1462
+ #
1463
+ # === {}[link:index.html"name="28.1] Digamma Function
1464
+ # ---
1465
+ # * GSL::Sf::psi_int(n)
1466
+ #
1467
+ # Computes the digamma function psi(n) for positive integer <tt>n</tt>.
1468
+ # The digamma function is also called the Psi function.
1469
+ # ---
1470
+ # * GSL::Sf::psi(x)
1471
+ #
1472
+ # Computes the digamma function psi(x) for general x, x != 0.
1473
+ # ---
1474
+ # * GSL::Sf::psi_1piy(x)
1475
+ #
1476
+ # Computes the real part of the digamma function on the line 1+i y, Re[psi(1 + i y)].
1477
+ #
1478
+ # === {}[link:index.html"name="28.2] Trigamma Function
1479
+ # ---
1480
+ # * GSL::Sf::psi_1_int(n)
1481
+ #
1482
+ # Computes the Trigamma function psi'(n) for positive integer <tt>n</tt>.
1483
+ # ---
1484
+ # * GSL::Sf::psi_1(x)
1485
+ #
1486
+ # Computes the Trigamma function psi'(x) for general <tt>x</tt>.
1487
+ #
1488
+ # === {}[link:index.html"name="28.3] Polygamma Function
1489
+ # ---
1490
+ # * GSL::Sf::psi_n(m, x)
1491
+ #
1492
+ # Computes the polygamma function psi^{(m)}(x) for m >= 0, x > 0.
1493
+ #
1494
+ # == {}[link:index.html"name="29] Synchrotron Functions
1495
+ # ---
1496
+ # * GSL::Sf::synchrotron_1(x)
1497
+ #
1498
+ # Computes the first synchrotron function x int_x^infty dt K_{5/3}(t) for x >= 0.
1499
+ #
1500
+ # ---
1501
+ # * GSL::Sf::synchrotron_2(x)
1502
+ #
1503
+ # Computes the second synchrotron function x K_{2/3}(x) for x >= 0.
1504
+ #
1505
+ # == {}[link:index.html"name="30] Transport Functions
1506
+ # The transport functions J(n,x) are defined by the integral representations
1507
+ # J(n,x) := int_0^x dt t^n e^t /(e^t - 1)^2.
1508
+ #
1509
+ # ---
1510
+ # * GSL::Sf::transport_2(x)
1511
+ # * GSL::Sf::transport_3(x)
1512
+ # * GSL::Sf::transport_4(x)
1513
+ # * GSL::Sf::transport_5(x)
1514
+ #
1515
+ # These methods compute the transport function J(n, x), for n = 2, 3, 4, and 5.
1516
+ #
1517
+ # == {}[link:index.html"name="31] Trigonometric Functions
1518
+ # === {}[link:index.html"name="31.1] Circular Trigonometric Functions
1519
+ # ---
1520
+ # * GSL::Sf::sin(x)
1521
+ # * GSL::Sf::cos(x)
1522
+ # * GSL::Sf::hypot(x, y)
1523
+ #
1524
+ # sqrt{x^2 + y^2}
1525
+ # ---
1526
+ # * GSL::Sf::sinc(x)
1527
+ #
1528
+ # sinc(x) = sin(pi x) / (pi x)
1529
+ #
1530
+ # === {}[link:index.html"name="31.2] Trigonometric Functions for Complex Arguments
1531
+ # ---
1532
+ # * GSL::Sf::complex_sin_e(zr, zi)
1533
+ # * GSL::Sf::complex_sin_e(z)
1534
+ # * GSL::Sf::complex_cos_e(zr, zi)
1535
+ # * GSL::Sf::complex_cos_e(z)
1536
+ # * GSL::Sf::complex_logsin_e(zr, zi)
1537
+ # * GSL::Sf::complex_logsin_e(z)
1538
+ #
1539
+ #
1540
+ # === {}[link:index.html"name="31.3] Hyperbolic Trigonometric Functions
1541
+ # ---
1542
+ # * GSL::Sf::lnsinh(x)
1543
+ # * GSL::Sf::lncosh(x)
1544
+ #
1545
+ #
1546
+ # === {}[link:index.html"name="31.4] Conversion Functions
1547
+ # ---
1548
+ # * GSL::Sf::polar_to_rect(r, theta)
1549
+ # * GSL::Sf::rect_to_polar(x, y)
1550
+ #
1551
+ #
1552
+ # === {}[link:index.html"name="31.5] Restriction Functions
1553
+ # ---
1554
+ # * GSL::Sf::angle_restrict_symm(theta)
1555
+ #
1556
+ # This forces the angle <tt>theta</tt> to lie in the range (-pi, pi].
1557
+ # ---
1558
+ # * GSL::Sf::angle_restrict_pos(theta)
1559
+ #
1560
+ # This forces the angle <tt>theta</tt> to lie in the range [0, 2pi).
1561
+ #
1562
+ # === {}[link:index.html"name="31.6] Trigonometric Functions With Error Estimates
1563
+ # ---
1564
+ # * GSL::Sf::sin_err(x, dx)
1565
+ #
1566
+ # Computes the sine of an angle <tt>x</tt> with an associated absolute error <tt>dx</tt>,
1567
+ # sin(x +- dx).
1568
+ # ---
1569
+ # * GSL::Sf::cos_err(x, dx)
1570
+ #
1571
+ # Computes the cosine of an angle <tt>x</tt> with an associated absolute error <tt>dx</tt>,
1572
+ # cos(x +- dx).
1573
+ #
1574
+ # == {}[link:index.html"name="32] Zeta Functions
1575
+ # === {}[link:index.html"name="32.1] Riemann Zeta Function
1576
+ # The Riemann zeta function is defined by the infinite sum
1577
+ # zeta(s) = sum_{k=1}^infty k^{-s}.
1578
+ #
1579
+ # ---
1580
+ # * GSL::Sf::zeta_int(n)
1581
+ #
1582
+ # Computes the Riemann zeta function zeta(n) for integer n, n != 1.
1583
+ # ---
1584
+ # * GSL::Sf::zeta(s)
1585
+ #
1586
+ # Computes the Riemann zeta function zeta(s) for arbitrary s, s != 1.
1587
+ #
1588
+ # === {}[link:index.html"name="32.2] Riemann Zeta Function Minus One
1589
+ # ---
1590
+ # * GSL::Sf::zetam1_int(n)
1591
+ #
1592
+ # Computes zeta(n) - 1 for integer n, n != 1.
1593
+ # ---
1594
+ # * GSL::Sf::zetam1(s)
1595
+ #
1596
+ # Computes zeta(s) - 1 for arbitrary s, s != 1.
1597
+ #
1598
+ # === {}[link:index.html"name="32.3] Hurwitz Zeta Function
1599
+ # The Hurwitz zeta function is defined by zeta(s,q) = sum_0^infty (k+q)^{-s}.
1600
+ # ---
1601
+ # * GSL::Sf::hzeta(s, q)
1602
+ #
1603
+ # Computes the Hurwitz zeta function zeta(s,q) for s > 1, q > 0.
1604
+ #
1605
+ # === {}[link:index.html"name="32.4] Eta Function
1606
+ # The eta function is defined by eta(s) = (1-2^{1-s}) zeta(s).
1607
+ # ---
1608
+ # * GSL::Sf::eta_int(n)
1609
+ #
1610
+ # Computes the eta function eta(n) for integer n.
1611
+ # ---
1612
+ # * GSL::Sf::eta(s)
1613
+ #
1614
+ # Computes the eta function eta(s) for arbitrary s.
1615
+ #
1616
+ # {prev}[link:files/rdoc/poly_rdoc.html]
1617
+ # {next}[link:files/rdoc/vector_rdoc.html]
1618
+ #
1619
+ # {Reference index}[link:files/rdoc/ref_rdoc.html]
1620
+ # {top}[link:files/rdoc/index_rdoc.html]
1621
+ #
1622
+ #