gsl/0000755000176200001440000000000013446115353011044 5ustar liggesusersgsl/inst/0000755000176200001440000000000013446020401012006 5ustar liggesusersgsl/inst/CITATION0000644000176200001440000000113213443526307013155 0ustar liggesuserscitHeader("To cite in publications use:") citEntry(entry = "Article", title = { paste("Special functions in R: introducing the gsl package") }, author = personList( person(given = c("Robin", "K. S."), family = "Hankin", email="hankin.robin@gmail.com")), journal = "R News", year = "2006", month = "October", volume = "6", issue = "4", textVersion = { paste("R. K. S. Hankin", "2006.", "Special functions in R: introducing the gsl package. ", "R News", "6(4)" ) }) gsl/inst/doc/0000755000176200001440000000000013446020401012553 5ustar liggesusersgsl/inst/doc/gslpaper.Rnw0000644000176200001440000002477513443526307015114 0ustar liggesusers% -*- mode: noweb; noweb-default-code-mode: R-mode; -*- \documentclass[nojss]{jss} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% declarations for jss.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% just as usual \author{Robin K. S. Hankin} \title{Special functions in \proglang{R}: introducing the \pkg{gsl} package} %\VignetteIndexEntry{A vignette for the gsl package} %% for pretty printing and a nice hypersummary also set: %% \Plainauthor{Achim Zeileis, Second Author} %% comma-separated \Plaintitle{Special functions in R: introducing the gsl package} \Shorttitle{The \pkg{gsl} package} \Abstract{ This vignette introduces the \pkg{gsl} package of \proglang{R} utilities for accessing the functions of the Gnu Scientific Library. An earlier version of this document was published as~\cite{hankin2006}. } \Keywords{\proglang{R}, special functions} \Plainkeywords{R, special functions} \Address{ Robin K. S. Hankin\\ Auckland University of Technology\\ AUT Tower\\ Wakefield Street\\ Auckland\\ New Zealand\\ E-mail: \email{hankin.robin@gmail.com} } %% need no \usepackage{Sweave.sty} \SweaveOpts{echo=FALSE} \begin{document} \section{Introduction} The Gnu Scientific Library (GSL) is a collection of numerical routines for scientific computing~\citep{galassi2005}. The routines are written in \proglang{C} and constitute a library for \proglang{C} programmers; the source code is distributed under the GNU General Public License. One stated aim of the GSL development effort is the development of wrappers for high level languages. The \proglang{R} programming language~\citep{rcore2008} is an environment for statistical computation and graphics. It consists of a language and a run-time environment with graphics and other features. Here I introduce \pkg{gsl}, an \proglang{R} package that allows direct access to many GSL functions, including all the special functions, from within an \proglang{R} session. The package is available on CRAN, \url{http://www.cran.r-project.org/}; the GSL is available at \url{http://www.gnu.org/software/gsl/}. \section{Package design philosophy} The package splits into two parts: the special functions, written by the author; and the \pkg{rng} and \pkg{qrng} functionality, written by Duncan Murdoch. These two parts are very different in implementation, yet follow a common desideratum, namely that the package be a transparent port of the GSL library. The package thus has the advantage of being easy to compare with the GSL, and easy to update verifiably. In this paper, the Airy functions are used to illustrate the package. They are typical of the package's capabilities and coding, and are relatively simple to understand, having only a single real argument. A brief definition, and an application in physics, is given in the appendix. The package is organized into units that correspond to the GSL header file. Thus all the Airy functions are defined in a single header file, \code{gsl\_sf\_airy.h}. The package thus contains a corresponding \proglang{C} file, \code{airy.c}; an \proglang{R} file \code{airy.R}, and a documentation file \code{Airy.Rd}. These three files together encapsulate the functionality defined in \code{gsl\_sf\_airy.h} in the context of an \proglang{R} package. This structure makes it demonstrable that the GSL has been systematically and completely wrapped. Functions are named such that one can identify a function in the GSL manual, and the corresponding \proglang{R} command will be the same but with the prefix\footnote{Some functions, such as \code{gsl\_sf\_sin()}, retain the prefix to avoid conflicts. A full list is given in \code{Misc.Rd}.} and, if present, the ``\code{\_e}'' suffix, removed. In the case of the special functions, the prefix is ``\code{gsl\_sf\_}''. Thus, GSL function \code{gsl\_sf\_airy\_Ai\_e()} of header file \code{gsl\_sf\_airy.h} is called, via intermediate \proglang{C} routine \code{airy\_Ai\_e()}, by \proglang{R} function \code{airy\_Ai()}. Documentation is provided for every function defined in \code{gsl\_sf\_airy.h} under \code{Airy.Rd}. The \pkg{gsl} package is not intended to add any numerical functionality to the GSL, although here and there I have implemented slight extensions such as the Jacobian elliptic functions whose \proglang{R} ports take a complex argument. \subsection{Package documentation} The \pkg{gsl} package is unusual in that its documentation consists almost entirely of pointers to the GSL reference manual~\citep{galassi2005}, and~\citet{abramowitz1965}. This follows from the transparent wrapper philosophy. In any case, the GSL reference manual would strictly dominate the \code{Rd} files of the \pkg{gsl} package. \section[Package gsl in use]{Package \pkg{gsl} in use} <>= <>= library(gsl) @ Most functions in the package are straightforwardly and transparently executable: <>= airy_Ai(1:3) @ The online helpfiles include many examples that reproduce graphs and tables that appear in \citeauthor{abramowitz1965}. This constitutes a useful check on the routines. For example, figures~\ref{airyfig_A} and~\ref{airyfig_B} show an approximate reproduction of their figures~10.6 and~10.7 (page~446). \begin{figure}[htbp] \begin{center} <>= x <- seq(from=0,to=10,len=100) plot(c(0,11),c(-1,1),type="n",main="Fig 10.6, p446",xlab="",ylab="",yaxt="n",xaxt="n",frame=FALSE) axis(1,pos=0,at=c(0,2,4,6,8,10),labels=c("","2","4","6","8","10")) axis(2,pos=0) lines(x,airy_Ai ( x),type="l",lty=1) lines(x,airy_Ai (-x),type="l",lty=2) lines(x,airy_Ai_deriv ( x),type="l",lty=3) lines(x,airy_Ai_deriv (-x),type="l",lty=4) text(1,0.6 ,"Ai(-x)" ) text(0.85,0.33 ,"Ai(x)" ) text(1.08,-0.26,"Ai'(x)" ) text(10.5,0.4 ,"Ai'(-x)") arrows(10, 0, 11, 0,angle=11) text(11,-0.1,"x") @ \caption{Functions~$\mathrm{Ai}(\pm x)$ \label{airyfig_A} and~$\mathrm{Ai}'(\pm x)$ as plotted in the helpfile for \code{airy\_Ai()} and appearing on page~446 of~\citet{abramowitz1965}} \end{center} \end{figure} \begin{figure}[htbp] \begin{center} <>= x <- seq(from=0,to=10,len=100) plot(c(0,10),c(-1,2.2),type="n",main="Fig 10.7, p446",xlab="",ylab="",yaxt="n",xaxt="n",frame=FALSE) axis(1,pos=0,at=c(0,1:9),labels=c("","1","2","3","4","5","6","7","8","9")) axis(2,pos=0) lines(x,airy_Bi ( x),type="l",lty=1) lines(x,airy_Bi (-x),type="l",lty=2) lines(x,airy_Bi_deriv ( x),type="l",lty=3) lines(x,airy_Bi_deriv (-x),type="l",lty=4) text(0.15,1.44 ,"Bi(x)",pos=4) text(1,0.90 ,"Bi'(x)",pos=4) text(2.25,0.56,"Bi'(-x)") text(0.7,-0.55,"Bi'(-x)",pos=4) arrows(9, 0, 10, 0, angle=11) text(10,-0.1,"x") @ \caption{Functions~$\mathrm{Bi}(\pm x)$ \label{airyfig_B} and~$\mathrm{Bi}'(\pm x)$ \citep{abramowitz1965}} \end{center} \end{figure} \section{Summary} The \pkg{gsl} package is a transparent \proglang{R} wrapper for the Gnu Scientific Library. It gives access to all the special functions, and the quasi-random sequence generation routines. Notation follows the GSL as closely as reasonably practicable; many graphs and tables appearing in \citeauthor{abramowitz1965} are reproduced by the examples in the helpfiles. \subsubsection*{Acknowledgments} I would like to acknowledge the many stimulating and helpful comments made by the \proglang{R}-help list over the years. \bibliography{gsl} \section*{Appendix: The Airy function and an application in quantum mechanics} The Airy function may not be familiar to some readers; here, I give a brief introduction to it and illustrate the \pkg{gsl} package in use in a physical context. The standard reference is~\citet{vallee2004}. For real argument~$x$, the Airy function is defined by the integral \begin{equation} \mathrm{Ai}(x)=\frac{1}{\pi}\int_0^\infty \cos\left(t^3/3+xt\right)\,dt\end{equation} and obeys the differential equation~$y''=xy$ (the other solution is denoted~$\mathrm{Bi}(x)$). In the field of quantum mechanics, one often considers the problem of a particle confined to a potential well that has a well-specified form. Here, I consider a potential of the form \begin{equation}\label{potential} V(r) = \left\{\begin{array}{ll} r & \mbox{if~$r>0$}\\ \infty & \mbox{if~$r\leq 0$}\\ \end{array} \right. \end{equation} Under such circumstances, the energy spectrum is discrete and the energy~$E_n$ corresponds to the $n^{\rm th}$ quantum state, denoted by $\psi_n$. If the mass of the particle is~$m$, it is governed by the Schr\"{o}dinger equation \begin{equation} \frac{d^2\psi_n(r)}{dr^2} + \frac{2m}{\hbar^2}\left(E_n-r\right)\psi_n(r)=0 \end{equation} Changing variables to $\xi=\left(E_n-e\right)\left(2m/\hbar\right)^{1/3}$ yields the Airy equation, viz \begin{equation} \frac{d^2\psi_n}{d\xi^2}+\xi\psi_n=0\end{equation} with solution \begin{equation} \psi_n(\xi)=N\mathrm{Ai}\left(-\xi\right) \end{equation} where $N$ is a normalizing constant (the~$\mathrm{Bi}\left(\cdot\right)$ term is omitted as it tends to infinity with increasing~$r$). Demanding that~$\psi_n(0)=0$ gives \[ E_n=-a_{n+1}\left(\hbar^2/2m\right)^{1/3} \] where~$a_n$ is the $n^{\rm th}$ root of the~$\mathrm{Ai}$ function [\code{Airy\_zero\_Ai()} in the package]; the off-by-one mismatch is due to the convention that the ground state is conventionally labelled state zero, not state~1. Thus, for example, $E_2=\mbox{\Sexpr{-round(airy_zero_Ai(3),4)}}\left(\hbar^2/2m\right)^{1/3}$. The normalization factor~$N$ is determined by requiring that $\int_0^\infty\psi^*\psi\,dr=1$ (physically, the particle is known to be somewhere with~$r>0$). It can be shown that \[ N=\frac{\left(2m/\hbar\right)^{1/6}}{\mathrm{Ai}'\left(a_n\right)}\] [the denominator is given by function \code{airy\_zero\_Ai\_deriv()} in the package] and the full solution is thus given by \begin{equation} \psi_n(r)=\frac{\left(2m/\hbar\right)^{1/6}} {\mathrm{Ai}'\left(a_n\right)} \mathrm{Ai}\left[ \left(\frac{2m}{\hbar}\right)^{1/3}\left(r-E_n\right)\right]. \end{equation} Figure~\ref{qm} shows the first six energy levels and the corresponding wave functions. \begin{figure}[htbp] \begin{center} <>= f <- function(r,n){ -airy_Ai(r+airy_zero_Ai(n+1))/airy_zero_Ai_deriv(n+1)} plot(c(0,10),c(0,10),type="l",yaxt="n",xaxt="n",frame=FALSE,xlab="r",ylab="V(r)") axis(1,pos=0) axis(2,pos=0) x <- seq(from=0,to=10,len=400) for(i in 0:5){ jj <- -airy_zero_Ai(i+1) lines(x=c(0,jj),y=c(jj,jj)) lines(x=c(jj,10),y=c(jj,jj),col="gray",lty=2) points(x,(i+1)*(-1)^i*f(x,i)+jj,type="l") } @ \caption{First six energy levels of a particle\label{qm} in a potential well (diagonal line) given by equation~\ref{potential}} \end{center} \end{figure} \end{document} gsl/inst/doc/gslpaper.pdf0000644000176200001440000026717113446020402015102 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 3110 /Filter /FlateDecode /N 59 /First 460 >> stream xZYs~.T.}K2Yb  0m3ҀɯfalPՋOs$yfYfb ydaYdRh 2(\2[*LaJe**4:Bg[<3%%3a$8#2tE1+j20kLbzsdNXEEcns-v#.bQ"y"H-)> JH͂3/)Bs-E)܈EEKuDX Ca18 ) %Jx x16LRX/MlfXBM)*&W\ocp|>LSlM?T#WÂ=>V;)M5Y VVjI nTa挝aɤ֫\\n)GKV h|imF! 财Wd҈aC2 =V&a`f~;+/L&Yg0E5i}ܻYx^>v$%^1em͛y*Ew\)5-ػOD˃}f2-GuV[mGoh0>&c[Jyl't&*!RMU3 y߫,[uퟖ*sީ/\dq![}rtuX."2QA;qROO~]XO{ a`,sY9&+&+id7 l⊞^,WgGykԂc7AI}dCO#\JzIvfyF`NOZ#`=z{uvnLeuR`$tmDK3EvΔb{!ꀚ.YWty[;|?OSs_!?k;>M?@IOh>p<ϏqUNʺy 3^5 ?O%?#^|y0Bc>_M4L[5>iMMyaFu<0׼.ϫL{]~uuޜMʒ7|?~:(af|ԹհDb^Z3j5:>@uks$m~ؔ,YQyݗG߽GGK.<ռa,XwnYM֕Y[ű dGsŘܶz3{V֧N`XbZ{d&w {;Τl֔ Qxb:zI,J@ܢ<0+bW dEW-e{l/>\c.MyJ-|ʮ҂ 6XPM.(v!VE"$ xK]VhR"V$ TTA&-\aMK4iD@~ӡ2Έ22Kq&H0&RJ 4"C4`ɑwдjyJ4I _!4W8Sơni40ya]r w@ 88]AVBUNC[1Ҫ%#M^\wȰxg rJI.ZSLf';p6>ܹSPUp'7w&޶ӋQb.u=J#0I,\r(Zdtb%# uޠmZf,hh;+24" M^>{v=7!):Z)4BsrJ^9Ug;ԭe#ȝIVDWEƬ ec=pYKz=􀬥- 8yFW9[z#建{ݰ d9]`=:z^k)p>8:X b?hmgDi pu3fV~*jh<<\bM;D%?`;3Yzv@ 8k73}?]}":mWd˜[$nɓTjT5_뜿:FӺ4C9)s)u,z +.CD}ј޲lrtVy`6=b ?[|foBrVB!EX^i`CIڬw,ku{ěhw SF^UJtΊ_eh%'CWd'#|AucScv3{Iâuh{hULD-|X AmoC ]Skz`[ WgzmA~s6wE\3KZ&+֫^yhuA_f@5Vg#2 !ZB(^"ҷ?#1i jDY \[>[)P?dUٌ!Dnw4?sb2d~ӯg\dPTA$$8)۩ 5zC BjſAiEQBBXDa`jfKToh_= wD\k3 4h,i:( e ‰{:9Q+e@q3 Ё.#\OίF ^?ȥDNN; @`d_>쐼Ddž$ ?}5c2Ӎ'%VI/U9wގOՔ2J7endstream endobj 61 0 obj << /Subtype /XML /Type /Metadata /Length 1646 >> stream GPL Ghostscript 9.21 R, special functions 2019-03-25T13:29:54+13:00 2019-03-25T13:29:54+13:00 LaTeX with hyperref package Special functions in R: introducing the gsl packageRobin K. S. Hankin endstream endobj 62 0 obj << /Type /ObjStm /Length 2862 /Filter /FlateDecode /N 58 /First 486 >> stream xZ[w6~_~aOOidi{ȴ̍LU;w$%m:N=,$73 I1pmD(K!@%J8chUXF\,3ňs爕KbG \k`kuDHgc"4 66q" "pI"5)"Pio28 :\L?ͥ 1'Z *܆oI abE B0A`a^ d3BjlP=I-x1@h#9ԑtƙblBs6_¼8J & ;ئgm88XR؆8%/F;~ y }++`1 oV+ϳm^'ʛBʻLgbqVRݻd9Y,]g˜\]db]\]|'G/[# $FJԎ$ǻ/KTY׵*zF2r"YN6EG37|sy;%YZB_ǁҌn`-#+wA ;KA@q [ͧU /yQ=Z&?dF:?N`,!lE\D_#QV)Ң&ebӛ'g:8 V*[K0livV]WW+̮sNht+`>!g8N =||Gu" {vl L=HX34:[C:ff;P=DUcMC4d5#o9\oQ^Zk_|5nMkR9F@W]Lh&7j_6DZ q|`!3BV6r9O4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Length 177 >> stream x]= wN S%bI  `""dOӡól3]䞂~By` {ҀgXGctV""U;. `ȃhk``JCR~4P*k%oF=6l✝%D8Z&ڵk#{Js߫1J"Ygendstream endobj 133 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 663 >> stream xO]HSasִb*SQNQQ& AAW-n͡dܦ[ۜ)YJ =ъz A}Cˇs8p< BC{ͦN'+MZR7֐d+KY#ۍg.xYyyKs]n5ZV3C^2sc,[AQP+k]$)c0x,sOOk.fnMY(0"@ٱ9V*1XO/q@ဓ-!-R#Ek;( C8b#$԰0:S`OxD8=UքN(^Ӣ,gW+\Vv~';)I$C-AKX^ y2'@@=(&!6i*7b@콯U44t~j͹n%uU_r ym6$(Ƽ8WO"NN]0\ӧF|@* G `:A(l z(SeryG00endstream endobj 134 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 3611 >> stream xWTT־+"ͨx/646@}ALQ#b/( (EJw J#R6ևDg<5,1'>Y?XV5{.w$Y/F"sfvl I1|oæo ,`iV{wF*Go #'' 6lfoTٸ)|GͲ>6c? :.22r20lRpgMYq Y 6tRǜ>6n>A Ì5$4,|~5+z&w_˖o t- c$0IJM:T)a6,Wd Ӱ}P>U}F9g9ز򗾚fY7_BWQchoJD':_+ BA&iχ6XI;(rI~g Es|BVo:?kˑ#$VfaF A)J%R :Izqܟa/\o|`KW /wF-IVbkrARR81q SGAd耎9q{APp4[*ሜNFmJR?2x;rYYđЯaD['= CWGn(bɬW~ufm(?|e_=pZ2zjWx`%>|}du(J&i~k]#FF㐺欓ЌS.nšh{xGlӧO7F 8{ my76:񩿳2fL*# ]gNXlm*%up%W)/̘d-$u&xߦ _8 F`<ŐBA}f Ʌm@.u^ } `}E!|?cnל9pP17TϧeA.pE^B]wxa8PMj&)8HF2L7cX bzșk|r.V/1(Q8oiGX`3,Hkt@D䓛Ⱦ56\VC-ϡ+($G5RDrͯ /3hey%ίsȎ2ie8+Ⱥ^h>`h~Ae1c vfmLۡv2v0&Ы$56/jxJhY2|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0km:3i'Tgt|W4|~ w-C祟 KʜT"cN^0 if u2k8[vI!cY[G,%>ӈD8q0+dcv*XǓ,\t^FGϟQQo*  ϗiޣM>Dfk)Υt 6pkNAwGOkM7MsZHGʽl\@=zc9=eX<_$ufr S(ػ|"TY")jcEc/{5Gq`w=4tT) |6!CAn褞   w[V٬:-k9A W(w5ƇD 6%d)ݭ_Ȏf/h\9[nk4xL gR**OQE E;U7~c?}c:hNV]R&dj!X\WPQ}Ymr v=t}Ђ:zyBc梐3ka<3G" HkxG3)o~_2-6Hf&V>uuD‹77 = 09\+;{mafA5mѝT;wZ(&j ƿX0:U8v`,m Kmeok φ&]kz21{)6=fHșXQ@>c[J"|f[]~kj墊ٟJ$:q:%_CC;j3tԊbɵ'3"cQʡ @' 12'xТ{_f5Oys}q q8qls[mV{g q^I-z*@&}!?n{9]Z U?uҁ@GgLFԡNcG =v1B>yXmDBܤW6 ^YA{-%j..3\8dp\F0bjRe-ZV+1V~6~RRq| NAVR.E:c}^gOKw^ruӳjn:9o=L+]dt~:f=퉉!C,endstream endobj 143 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 335 >> stream xcd`ab`dddu 21~H3a!.,U֜-|=<<<,k*={3#cnas~AeQfzFFcnjQfrbobIFjnb ZRaQRR`_^^[_nPYZZTWrp-(-I-ROI-c```4d`b`bdd{7m}ClΕVNHa_}r?Yu*r )lov›݇(oJ`W鞱FlYN^;q&{r\,y8WO7tendstream endobj 144 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 2765 >> stream xV TSg}1{*B_Tݺ̌6*Uׂ(BB ,a IN !@ ( JkS0u;vX.S[ysӱ;\a{U8z:##\cM_Ws$&TOp$24!U#RD/[tb?zP)o(DB@X"?gHHXJr@H*Y;w_񃄉By0IH|19$P.1 >^ OT$% R"1`}E:ۅclۀaobMXۂböc;0 6 qBTxqG@@v>4ךBb/d̒|)ȀT3OQ6uXY<_Qڒxm1+dEahm躏rςr *= ^v0zn3I;3 m墙43g\(_F IC☘y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܌شqO[Ľ=\d~ 5sgSt҄UҼ)v11q't9^X[r U5:xٙYHvgQPB7\pJ &SCF%p^aٓeڭ\SPKd+im|5>uN׷Ex%5 C/SC:VmiCpXr(ȄK(Ǜ00^jt2q!uh~VzV>66 >aLendstream endobj 146 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 343 >> stream xcd`ab`ddp 44~H3a!3,U֜C|=<<<,+'={3#cAys~AeQfzFFcnjQfrbobIFjnb ZRaQRR`_^^[_nPYZZTWuv-(-I-ROI-c``` b`0f`bdd S{='85o~Wte '~ ne׋!۹Y}} ?D+}gb[Q*_s/wt\Xpa`KU{endstream endobj 147 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1257 >> stream x]R}LSWExHů4Ѿ,х C B9 mX^*E(cnMQ6-msq̌,nq{tq{swι4hJM_)qѤ(DˬJSh_S)o%4)șp:ޟAihk/j/r9,&˛% KŋwÒgqF[ < /y+̂PpaIIxazk~Wb\&_;vjM* "nR*T;rMl3lLjy#+kU+MrAbt ah nucp9]")vu`f&DA*$o\Րc+za7|w6X"KNL4DAE_p 0'z}~}12fT?43-E|Cj<@-r!n-qc?Gѭ )e/F/QGԡ v0nII)xdOJ8t㇇Z?&iE(+ӑd0>  sXOڄӹgMM?RJĘ7 ft~NTTTBEum_ԟ2_"*EPV/ U^M4(@ S~6FQM}'*3FjAK9R%nOxv]QzDOn@X D21b VeˌFwS]|$oĖEu~][(kEάQendstream endobj 148 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 514 >> stream xCMMI80B@:j  kid`nsCopyright (c) 1997, 2009 American Mathematical Society (), with Reserved Font Name CMMI8.CMMI8Computer Modernn=OА\8΋v\TaxZ~j~Ro s9ade{WC:WZen_Xgrt{ls\YƵruyxj|P}f*|rtS0eX~{<}~vCp`  7 Εendstream endobj 149 0 obj << /Filter /FlateDecode /Length 14945 >> stream xM&q+b^ ^*B^$#~LdYyDw6P(L(d&TvۅO}ϟ>SoŮ͔׼fzOizky9zۗ?^>_R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iePz@io"}GFbCq"VgGIŹT$C yBpM( tvʓ$NW/F>6N8fdSx`-_LI8&y<qX TgLLqz'yO);!b2wQT ̖;[G%d|)-j 2verI%($fͧ{;Lfgpi.H_h@Ny MQO3qKZdb˿Y]A"RP@q-i3xh۰5`V C!/,@%KB9fE׬03a $!<$,-#F"@X!1>E`PTSDcLr{L 'wb@R(H5ĆZ/I7!҂JGi2uE$QUKjtwa!pFAP&A]-)]O<4: sa:}я4` /tWdkWZclO!>m"5ZϳA"+R,Ţ etE>s22<{)RaǬ{4~Ѩm)"5s  [XTcSa/͍ލX&St1f&ش ۄ:gҐRT9ɩ }O9䢐|E}h':VrGbb[0fX-&E-AEMH8,7Iey'P;$Y_15Ȝx?)Acf8u>:J nvy *bd^!k9a `V1FMTC[bQR/#!w1mгz~kZsJ𿢡ې7HY-˂o ԢJTYܙU?IzhP?tA 2<`9PӗG|c)wʗHʹ^frsTс2"[fVDk (Ik~!_Z" @ (s~^*o6`!CTЎ~P//CG>/wR΍.9n-R~+\2 5׾F#RgRO1~# ѶRupor QF0 MJTu%sFJg|2řfr|(LGIiL=PaӁt].pPIg%˞'_~ ^H ě7)hb~eؼYct266fvH%])\g;_g{L;X 'H{4~%\2 \JozxiBh^%#(SEꎁBG{E cirdy?rL}]ȄU來X$%7W:O$$URypt =s‰4b@I(ߔ.})w/ rtI>]59Fmbpj!A4g*ў~Qa/48؁2zp]=8GJE!}l1M=]}7;n-*a^AYyUVk yo/\m]Q'5%İ}~]CBgQvrr\r+"x7~aO'&q6?6M V&Dzz"5`SB-G 㨜^ K) /M.Nwu. Ó:<-&Yux:_O|?KKendstream endobj 151 0 obj << /Type /XRef /Length 157 /Filter /FlateDecode /DecodeParms << /Columns 5 /Predictor 12 >> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 152 /ID [<87672d2887ce01db71cfc417ea9760e6>] >> stream xcb&F~0 $8J҄3~o6Ynq [2b R<D7H DHI Y LHnu ,DH DEHAf: boˮDec@K0'i endstream endobj startxref 93386 %%EOF gsl/inst/doc/gslpaper.R0000644000176200001440000000465113446020401014521 0ustar liggesusers### R code from vignette source 'gslpaper.Rnw' ################################################### ### code chunk number 1: gslpaper.Rnw:119-119 ################################################### ################################################### ### code chunk number 2: gslpaper.Rnw:120-121 ################################################### library(gsl) ################################################### ### code chunk number 3: gslpaper.Rnw:126-127 ################################################### airy_Ai(1:3) ################################################### ### code chunk number 4: gslpaper.Rnw:140-154 ################################################### x <- seq(from=0,to=10,len=100) plot(c(0,11),c(-1,1),type="n",main="Fig 10.6, p446",xlab="",ylab="",yaxt="n",xaxt="n",frame=FALSE) axis(1,pos=0,at=c(0,2,4,6,8,10),labels=c("","2","4","6","8","10")) axis(2,pos=0) lines(x,airy_Ai ( x),type="l",lty=1) lines(x,airy_Ai (-x),type="l",lty=2) lines(x,airy_Ai_deriv ( x),type="l",lty=3) lines(x,airy_Ai_deriv (-x),type="l",lty=4) text(1,0.6 ,"Ai(-x)" ) text(0.85,0.33 ,"Ai(x)" ) text(1.08,-0.26,"Ai'(x)" ) text(10.5,0.4 ,"Ai'(-x)") arrows(10, 0, 11, 0,angle=11) text(11,-0.1,"x") ################################################### ### code chunk number 5: gslpaper.Rnw:165-179 ################################################### x <- seq(from=0,to=10,len=100) plot(c(0,10),c(-1,2.2),type="n",main="Fig 10.7, p446",xlab="",ylab="",yaxt="n",xaxt="n",frame=FALSE) axis(1,pos=0,at=c(0,1:9),labels=c("","1","2","3","4","5","6","7","8","9")) axis(2,pos=0) lines(x,airy_Bi ( x),type="l",lty=1) lines(x,airy_Bi (-x),type="l",lty=2) lines(x,airy_Bi_deriv ( x),type="l",lty=3) lines(x,airy_Bi_deriv (-x),type="l",lty=4) text(0.15,1.44 ,"Bi(x)",pos=4) text(1,0.90 ,"Bi'(x)",pos=4) text(2.25,0.56,"Bi'(-x)") text(0.7,-0.55,"Bi'(-x)",pos=4) arrows(9, 0, 10, 0, angle=11) text(10,-0.1,"x") ################################################### ### code chunk number 6: gslpaper.Rnw:277-290 ################################################### f <- function(r,n){ -airy_Ai(r+airy_zero_Ai(n+1))/airy_zero_Ai_deriv(n+1)} plot(c(0,10),c(0,10),type="l",yaxt="n",xaxt="n",frame=FALSE,xlab="r",ylab="V(r)") axis(1,pos=0) axis(2,pos=0) x <- seq(from=0,to=10,len=400) for(i in 0:5){ jj <- -airy_zero_Ai(i+1) lines(x=c(0,jj),y=c(jj,jj)) lines(x=c(jj,10),y=c(jj,jj),col="gray",lty=2) points(x,(i+1)*(-1)^i*f(x,i)+jj,type="l") } gsl/configure.ac0000644000176200001440000000304613443526307013337 0ustar liggesusers AC_INIT([src/airy.c]) #AC_CHECK_LIB(gsl, gsl_sf_airy_Ai_e, # [LIBS="${LIBS} -lgsl -lgslcblas"], # [AC_MSG_ERROR([Cannot find Gnu Scientific Library.])], # [-lgslcblas]) #AC_CHECK_HEADER([gsl/gsl_version.h], , # [AC_MSG_ERROR([Cannot find GSL headers.])]) # Following lines kindly supplied by Dirk Eddelbuettel ## Use gsl-config to find arguments for compiler and linker flags ## ## Check for non-standard programs: gsl-config(1) AC_PATH_PROG([GSL_CONFIG], [gsl-config]) ## If gsl-config was found, let's use it if test "${GSL_CONFIG}" != ""; then # Use gsl-config for header and linker arguments GSL_CFLAGS=`${GSL_CONFIG} --cflags` GSL_LIBS=`${GSL_CONFIG} --libs` CFLAGS="$CFLAGS $GSL_CFLAGS" # kindly supplied by Ray Brownrigg else AC_MSG_ERROR([gsl-config not found, is GSL installed?]) fi AC_MSG_CHECKING([if GSL version >= 2.1]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include #include int main() { #ifdef GSL_VERSION int major, minor; char *gslv = GSL_VERSION; if ((sscanf(gslv, "%d.%d", &major, &minor)) != 2) { exit (1); } exit (minor < 1); exit (major < 2); #else exit(1); #endif } ]])], [gsl_version_ok=yes], [gsl_version_ok=no], [gsl_version_ok=yes]) if test "${gsl_version_ok}" = no; then AC_MSG_ERROR([Need GSL version >= 1.16]) else AC_MSG_RESULT([yes]) fi # Now substitute these variables in src/Makevars.in to create src/Makevars AC_SUBST(GSL_CFLAGS) AC_SUBST(GSL_LIBS) AC_OUTPUT(src/Makevars) gsl/src/0000755000176200001440000000000013446020402011621 5ustar liggesusersgsl/src/hyperg.c0000644000176200001440000000705513446020402013272 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_dawson goes to dawson. */ void hyperg_0F1_e(const double *c, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_0F1_e(c[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_1F1_int_e(const int *m, const int *n, double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_1F1_int_e(m[i], n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_1F1_e(const double *a, const double *b, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_1F1_e(a[i], b[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_U_int_e(const int *m, const int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_U_int_e(m[i], n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_U_e(const double *a, const double *b, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_U_e(a[i], b[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_2F1_e(const double *a, const double *b, const double *c, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_2F1_e(a[i], b[i], c[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_2F1_conj_e(const double *aR, const double *aI, const double *c, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_2F1_conj_e(aR[i], aI[i], c[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_2F1_renorm_e(const double *a, const double *b, const double *c, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_2F1_renorm_e(a[i], b[i], c[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_2F1_conj_renorm_e(const double *aR, const double *aI, const double *c, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_2F1_conj_renorm_e(aR[i], aI[i], c[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_2F0_e(const double *a, const double *b, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_2F0_e(a[i], b[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/qrng.c0000644000176200001440000000541113446020402012735 0ustar liggesusers#include #include #include /* function names generated by removing "gsl_" from the beginning of the name. Thus gsl_qrng_alloc goes to qrng_alloc. */ /* type 0 is gsl_qrng_niederreiter_2, type 1 is gsl_qrng_sobol */ static void cleanup(SEXP r) { gsl_qrng_free((gsl_qrng*)EXTPTR_PTR(r)); } SEXP qrng_alloc(SEXP type, SEXP dimension) { const gsl_qrng_type * T = NULL; SEXP result; switch(asInteger(type)) { case 0: T = gsl_qrng_niederreiter_2; break; case 1: T = gsl_qrng_sobol; break; default: error("unknown QRNG type"); }; PROTECT(dimension = AS_INTEGER(dimension)); result = R_MakeExternalPtr(gsl_qrng_alloc(T, (unsigned int)asInteger(dimension)), dimension, R_NilValue); UNPROTECT(1); R_RegisterCFinalizer(result, cleanup); return result; } SEXP qrng_clone(SEXP r) { SEXP result; gsl_qrng *gen = NULL; if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)EXTPTR_PTR(r))) error("not a QRNG generator"); result = R_MakeExternalPtr(gsl_qrng_clone(gen), PROTECT(duplicate(EXTPTR_TAG(r))), R_NilValue); UNPROTECT(1); R_RegisterCFinalizer(result, cleanup); return result; } SEXP qrng_init(SEXP r) { gsl_qrng *gen = NULL; if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)EXTPTR_PTR(r))) error("not a QRNG generator"); gsl_qrng_init(gen); return r; } SEXP qrng_name(SEXP r) { gsl_qrng *gen = NULL; if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)EXTPTR_PTR(r))) error("not a QRNG generator"); return mkString(gsl_qrng_name(gen)); } SEXP qrng_size(SEXP r) { gsl_qrng *gen = NULL; if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)EXTPTR_PTR(r))) error("not a QRNG generator"); return ScalarInteger(gsl_qrng_size(gen)); } SEXP qrng_state(SEXP r) { gsl_qrng *gen = NULL; if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)EXTPTR_PTR(r))) error("not a QRNG generator"); return R_MakeExternalPtr(gsl_qrng_state(gen), R_NilValue, R_NilValue); } SEXP qrng_get(SEXP r) { SEXP result; gsl_qrng *gen = NULL; int dim; if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)EXTPTR_PTR(r))) error("not a QRNG generator"); dim = asInteger(EXTPTR_TAG(r)); result = PROTECT(NEW_NUMERIC(dim)); if (gsl_qrng_get(gen, REAL(result)) != GSL_SUCCESS) error("QRNG generator failed"); UNPROTECT(1); return result; } SEXP get_n(SEXP r, SEXP n) { SEXP result; gsl_qrng *gen = NULL; double *value; int i, dim, num = asInteger(n); if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)EXTPTR_PTR(r))) error("not a QRNG generator"); dim = asInteger(EXTPTR_TAG(r)); result = PROTECT(NEW_NUMERIC(dim*num)); value = REAL(result); for (i=0; i #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_gamma_e goes to gamma_e. */ void gamma_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gamma_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lngamma_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lngamma_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lngamma_sgn_e(const double *x, const int *len, double *val, double *err, int *status, double *sgn) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lngamma_sgn_e(x[i], &result, sgn+i) ; val[i] = result.val; err[i] = result.err; } } void gammastar_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gammastar_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gammainv_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gammainv_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lngamma_complex_e(const double *zr, const double *zi, const int *len, double *val_lnr, double *val_arg, double *err_lnr, double *err_arg, int *status) { int i; gsl_sf_result lnr; gsl_sf_result arg; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lngamma_complex_e(zr[i], zi[i], &lnr, &arg) ; val_lnr[i] = lnr.val; val_arg[i] = arg.val; err_lnr[i] = lnr.err; err_arg[i] = arg.err; } } void taylorcoeff_e(const int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_taylorcoeff_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fact_e(const unsigned int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fact_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void doublefact_e(const unsigned int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_doublefact_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lnfact_e(const unsigned int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lnfact_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lndoublefact_e(const unsigned int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lndoublefact_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void choose_e(const unsigned int *n, unsigned int *m, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_choose_e(n[i], m[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lnchoose_e(const unsigned int *n, unsigned int *m, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_choose_e(n[i], m[i], &result) ; val[i] = result.val; err[i] = result.err; } } void poch_e(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_poch_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lnpoch_e(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lnpoch_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lnpoch_sgn_e(const double *a, const double *x, const int *len, double *val, double *err, int *status, double *sgn) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lnpoch_sgn_e(a[i], x[i], &result, sgn+i) ; val[i] = result.val; err[i] = result.err; } } void pochrel_e(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_pochrel_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gamma_inc_P_e(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gamma_inc_P_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gamma_inc_Q_e(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gamma_inc_Q_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gamma_inc_e(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gamma_inc_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void beta_e(const double *a, const double *b, int *nb, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nb ; i++){ status[i] = gsl_sf_beta_e(a[i], b[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lnbeta_e(const double *a, const double *b, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lnbeta_e(a[i], b[i], &result) ; val[i] = result.val; err[i] = result.err; } } void beta_inc_e(const double *a, const double *b, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_beta_inc_e(a[i], b[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/poly.c0000644000176200001440000000031213446020402012744 0ustar liggesusers#include void gsl_poly(const double *c, const int *len, double *x, const int *lenx, double *ans) { int i; for(i = 0; i< *lenx ; i++){ ans[i] = gsl_poly_eval(c, *len, x[i]); } } gsl/src/pow_int.c0000644000176200001440000000101013446020402013434 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name, and stripping the _e. Thus gsl_sf_laguerre_1_e goes to laguerre_1. */ void pow_int(const double *x, const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_pow_int_e(x[i], n[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/bessel.c0000644000176200001440000004112313446020402013243 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_bessel_J0 goes to bessel_J0. */ static int sf_mode[] = { GSL_PREC_DOUBLE, GSL_PREC_SINGLE, GSL_PREC_APPROX } ; /* J series begins*/ void bessel_J0_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_J0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_J1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_J1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Jn_e(int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Jn_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Jn_array_e(const int *nmin, const int *nmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Jn_array(*nmin, *nmax, x[i], out+i*(*nmax - *nmin +1)); } } /* J series ends*/ /* Y series begins*/ void bessel_Y0_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Y0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Y1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Y1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Yn_e(int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Yn_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Yn_array_e(const int *nmin, const int *nmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i=0 ; i< *len ; i++){ status[i] = gsl_sf_bessel_Yn_array(*nmin, *nmax, x[i], out+i*(*nmax - *nmin +1)); } } /* Y series ends*/ /* I series begins*/ void bessel_I0_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_I0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_I1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_I1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_In_e(int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_In_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_In_array_e(const int *nmin, const int *nmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_In_array(*nmin, *nmax, x[i], out+i*(*nmax - *nmin +1)); } } /*I series ends*/ /* I_scaled series begins*/ void bessel_I0_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_I0_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } /* J series begins*/ /* J series begins*/ void bessel_I1_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_I1_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_In_scaled_e(int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_In_scaled_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_In_scaled_array_e(const int *nmin, const int *nmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_In_scaled_array(*nmin, *nmax, x[i], out+i*(*nmax - *nmin +1)); } } /* I_scaled series begins*/ /* K series begins*/ void bessel_K0_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_K0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_K1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_K1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Kn_e(int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Kn_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Kn_array_e(const int *nmin, const int *nmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Kn_array(*nmin, *nmax, x[i], out+i*(*nmax - *nmin +1)); } } /* K series ends*/ /* K_scaled series begins*/ void bessel_K0_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_K0_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_K1_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_K1_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Kn_scaled_e(int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Kn_scaled_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Kn_scaled_array_e(const int *nmin, const int *nmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Kn_scaled_array(*nmin, *nmax, x[i], out+i*(*nmax - *nmin +1)); } } /* K_scaled series ends */ /* j0 series begins */ void bessel_j0_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_j0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_j1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_j1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_j2_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_j2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_jl_e(int *l, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_jl_e(l[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_jl_array_e(int *lmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_jl_array(*lmax, x[i], out+i*(*lmax+1)); } } void bessel_jl_steed_array_e(int *lmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_jl_steed_array(*lmax, x[i], out+i*(*lmax+1)); } } void bessel_y0_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_y0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_y1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_y1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_y2_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_y2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_yl_e(int *l, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_yl_e(l[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_yl_array_e(int *lmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_yl_array(*lmax, x[i], out+i*(*lmax+1)); } } /* yl series ends */ /* i_scaled series starts */ void bessel_i0_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_i0_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_i1_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_i1_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_i2_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_i2_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_il_scaled_e(int *l, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_il_scaled_e(l[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_il_scaled_array_e(int *lmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_il_scaled_array(*lmax, x[i], out+i*(*lmax +1)); } } /* i_scaled series ends */ /* k_scaled series starts */ void bessel_k0_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_k0_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_k1_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_k1_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_k2_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_k2_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_kl_scaled_e(int *l, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_kl_scaled_e(l[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_kl_scaled_array_e(int *lmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_kl_scaled_array(*lmax, x[i], out+i*(*lmax +1)); } } /*k_scaled series ends */ /*Jnu series starts */ void bessel_Jnu_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Jnu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_sequence_Jnu_e(double *nu, double *v, int *nv, int *mode, int *status) { gsl_set_error_handler_off(); *status=gsl_sf_bessel_sequence_Jnu_e(*nu, sf_mode[*mode], (size_t) *nv, v); } void bessel_Ynu_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Ynu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Inu_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Inu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Inu_scaled_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Inu_scaled_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Knu_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Knu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_lnKnu_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_lnKnu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Knu_scaled_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Knu_scaled_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_zero_J0_e(unsigned int *s, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_zero_J0_e(s[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_zero_J1_e(unsigned int *s, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_zero_J1_e(s[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_zero_Jnu_e(double *nu, unsigned int *s, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_zero_Jnu_e(nu[i], s[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/coupling.c0000644000176200001440000000315013446020402013604 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and _e from the end. Thus gsl_sf_debye_1_e goes to debye_1. */ void coupling_3j(const int *two_ja, const int *two_jb, const int *two_jc, const int *two_ma, const int *two_mb, const int *two_mc, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coupling_3j_e(two_ja[i], two_jb[i], two_jc[i], two_ma[i], two_mb[i], two_mc[i], &result) ; val[i] = result.val; err[i] = result.err; } } void coupling_6j(const int *two_ja, const int *two_jb, const int *two_jc, const int *two_jd, const int *two_je, const int *two_jf, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coupling_6j_e(two_ja[i], two_jb[i], two_jc[i], two_jd[i], two_je[i], two_jf[i], &result) ; val[i] = result.val; err[i] = result.err; } } void coupling_9j(const int *two_ja, const int *two_jb, const int *two_jc, const int *two_jd, const int *two_je, const int *two_jf, const int *two_jg, const int *two_jh, const int *two_ji, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coupling_9j_e(two_ja[i], two_jb[i], two_jc[i], two_jd[i], two_je[i], two_jf[i], two_jg[i], two_jh[i], two_ji[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/debye.c0000644000176200001440000000247313446020402013063 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and _e from the end. Thus gsl_sf_debye_1_e goes to debye_1. */ void debye_1(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_debye_1_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void debye_2(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_debye_2_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void debye_3(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_debye_3_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void debye_4(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_debye_4_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/dawson.c0000644000176200001440000000072013446020402013257 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_dawson goes to dawson. */ void dawson(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_dawson_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/lambert.c0000644000176200001440000000143613446020402013417 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and the _e from the end. Thus gsl_sf_lambert_W0 goes to lambert_W0. */ void lambert_W0(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lambert_W0_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void lambert_Wm1(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lambert_Wm1_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/transport.c0000644000176200001440000000250613446020402014024 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_transport goes to transport. */ void transport_2(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_transport_2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void transport_3(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_transport_3_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void transport_4(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_transport_4_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void transport_5(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_transport_5_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/rng.c0000644000176200001440000001003513446020402012552 0ustar liggesusers#include #include #include #include static void rng_cleanup(SEXP r) { gsl_rng_free((gsl_rng*)EXTPTR_PTR(r)); } gsl_rng* get_rng_from_sexp(SEXP rng) { gsl_rng* gen = NULL; if (TYPEOF(rng) != EXTPTRSXP || !(gen = (gsl_rng*)EXTPTR_PTR(rng))) { error("not a random number generator"); } /* if gen is NULL here, this will probably cause a segfault */ return gen; } SEXP rng_alloc(SEXP type) { const gsl_rng_type * T = NULL; SEXP result; switch(asInteger(type)) { case 0: T = gsl_rng_mt19937; break; case 1: T = gsl_rng_ranlxs0; break; case 2: T = gsl_rng_ranlxs1; break; case 3: T = gsl_rng_ranlxs2; break; case 4: T = gsl_rng_ranlxd1; break; case 5: T = gsl_rng_ranlxd2; break; case 6: T = gsl_rng_ranlux; break; case 7: T = gsl_rng_ranlux389; break; case 8: T = gsl_rng_cmrg; break; case 9: T = gsl_rng_mrg; break; case 10: T = gsl_rng_taus; break; case 11: T = gsl_rng_taus2; break; case 12: T = gsl_rng_gfsr4; break; case 13: T = gsl_rng_minstd; break; default: error("unknown random number generator type"); }; result = R_MakeExternalPtr(gsl_rng_alloc(T), R_NilValue, R_NilValue) ; R_RegisterCFinalizer(result, rng_cleanup); return result; } SEXP rng_set(SEXP r, SEXP sseed) { unsigned long int seed; gsl_rng* gen; gen = get_rng_from_sexp(r); PROTECT(sseed = AS_NUMERIC(sseed)); seed = *(NUMERIC_POINTER(sseed)); UNPROTECT(1); gsl_rng_set(gen, seed); return sseed; } SEXP rng_clone(SEXP r) { SEXP result; gsl_rng* gen; gen = get_rng_from_sexp(r); result = R_MakeExternalPtr(gsl_rng_clone(gen), PROTECT(duplicate(EXTPTR_TAG(r))), R_NilValue); UNPROTECT(1); R_RegisterCFinalizer(result, rng_cleanup); return result; } SEXP rng_name(SEXP r) { gsl_rng* gen; gen = get_rng_from_sexp(r); return mkString(gsl_rng_name(gen)); } SEXP rng_min(SEXP r) { SEXP result; gsl_rng* gen; gen = get_rng_from_sexp(r); PROTECT(result = NEW_NUMERIC(1)); NUMERIC_POINTER(result)[0] = gsl_rng_min(gen); UNPROTECT(1); return result; } SEXP rng_max(SEXP r) { SEXP result; gsl_rng* gen; gen = get_rng_from_sexp(r); PROTECT(result = NEW_NUMERIC(1)); NUMERIC_POINTER(result)[0] = gsl_rng_max(gen); UNPROTECT(1); return result; } SEXP rng_get(SEXP r, SEXP slength) { SEXP result; gsl_rng* gen; int length, i; /* parse args */ gen = get_rng_from_sexp(r); PROTECT(slength = AS_NUMERIC(slength)); length = (int)*(NUMERIC_POINTER(slength)); UNPROTECT(1); /* get draws */ PROTECT(result = NEW_NUMERIC(length)); for(i = 0; i */ #include #include "vector.h" #include gsl_vector *vector_gsl_from_R(SEXP x) { int i, n; gsl_vector *result; double *x_; assert(isNumeric(x)); x_ = REAL(x); n = LENGTH(x); result = gsl_vector_alloc(n); assert(result != NULL); for (i = 0; i < n; i++) gsl_vector_set(result, i, x_[i]); return result; } SEXP vector_R_from_gsl(const gsl_vector *x) { SEXP result; double *x_; int i; int n = x->size; PROTECT(result = NEW_NUMERIC(n)); x_ = NUMERIC_POINTER(result); for (i = 0; i < n; i++) x_[i] = gsl_vector_get(x, i); UNPROTECT(1); return result; } void vector_assign_gsl_from_R(gsl_vector *x, SEXP y) { double *y_ = NUMERIC_POINTER(y); int i; int n = x->size; assert(LENGTH(y) == n); for (i = 0; i < n; i++) gsl_vector_set(x, i, y_[i]); } gsl/src/laguerre.c0000644000176200001440000000270213446020402013574 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and the _e from the end. Thus gsl_sf_laguerre_1_e goes to laguerre_1. */ void laguerre_1(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_laguerre_1_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void laguerre_2(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_laguerre_2_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void laguerre_3(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_laguerre_3_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void laguerre_n(int *n, const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_laguerre_n_e(*n, a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/synchrotron.c0000644000176200001440000000142413446020402014356 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_synchrotron goes to synchrotron. */ void synchrotron_1(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_synchrotron_1_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void synchrotron_2(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_synchrotron_2_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/vector.h0000644000176200001440000000062113446020402013273 0ustar liggesusers/* Conversion between GSL vectors and R vectors. * * Written in 2007 by Andrew Clausen */ #ifndef RGSL_VECTOR_H #define RGSL_VECTOR_H #include #include #include extern gsl_vector *vector_gsl_from_R(SEXP x); extern SEXP vector_R_from_gsl(const gsl_vector *x); extern void vector_assign_gsl_from_R(gsl_vector *x, SEXP y); #endif gsl/src/error.c0000644000176200001440000000360513446020402013122 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_airy_Ai goes to airy_Ai. */ void erf_e(const double *x, const int *len, int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_erf_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void erfc_e(const double *x, const int *len, int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_erfc_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void log_erfc_e(const double *x, const int *len, int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_log_erfc_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void erf_Z_e(const double *x, const int *len, int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_erf_Z_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void erf_Q_e(const double *x, const int *len, int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_erf_Q_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hazard_e(const double *x, const int *len, int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hazard_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/clausen.c0000644000176200001440000000072513446020402013423 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_dawson goes to dawson. */ void clausen_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_clausen_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/elljac.c0000644000176200001440000000067313446020402013225 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_dawson goes to dawson. */ void elljac_e(const double *u, const double *m, const int *len, double *sn, double *cn, double *dn, int *status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_elljac_e(u[i], m[i], sn+i, cn+i, dn+i); } } gsl/src/Makevars.in0000644000176200001440000000031613446020402013722 0ustar liggesusers# Kindly supplied by Dirk Eddelbuettel # set by configure GSL_CFLAGS = @GSL_CFLAGS@ GSL_LIBS = @GSL_LIBS@ # combine to standard arguments for R PKG_CPPFLAGS = $(GSL_CFLAGS) -I. PKG_LIBS = $(GSL_LIBS) gsl/src/ellint.c0000644000176200001440000000750413446020402013262 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_airy_Ai goes to airy_Ai. See section 7.13 of the GSL manual for documentation */ const gsl_mode_t sf_mode[] = { GSL_PREC_DOUBLE, GSL_PREC_SINGLE, GSL_PREC_APPROX } ; void ellint_Kcomp_e(const double *k, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_ellint_Kcomp_e(k[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_Ecomp_e(const double *k, const int *nk, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nk ; i++){ status[i] = gsl_sf_ellint_Ecomp_e(k[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_F_e(double *phi, const double *k, const int *nk, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nk ; i++){ status[i] = gsl_sf_ellint_F_e(phi[i], k[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_E_e(double *phi, const double *k, const int *nk, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nk ; i++){ status[i] = gsl_sf_ellint_E_e(phi[i], k[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_P_e(double *phi, const double *k, const double *n, const int *nk, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nk ; i++){ status[i] = gsl_sf_ellint_P_e(phi[i], k[i], n[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_D_e(const double *phi, const double *k, const int *nk, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nk ; i++){ status[i] = gsl_sf_ellint_D_e(phi[i], k[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_RC_e(const double *x, const double *y, const int *nx, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nx ; i++){ status[i] = gsl_sf_ellint_RC_e(x[i], y[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_RD_e(const double *x, const double *y, double *z, int *nx, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nx ; i++){ status[i] = gsl_sf_ellint_RD_e(x[i], y[i], z[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_RF_e(const double *x, const double *y, const double *z, const int *nx, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nx ; i++){ status[i] = gsl_sf_ellint_RF_e(x[i], y[i], z[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_RJ_e(const double *x, const double *y, const double *z, const double *p, const int *nx, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nx ; i++){ status[i] = gsl_sf_ellint_RJ_e(x[i], y[i], z[i], *p, sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/psi.c0000644000176200001440000000351513446020402012564 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and _e from the end. Thus gsl_sf_psi_1_e goes to psi_1. */ void psi_int(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_psi_int_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void psi(double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_psi_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void psi_1piy(double *y, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_psi_1piy_e(y[i], &result) ; val[i] = result.val; err[i] = result.err; } } void psi_1_int(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_psi_1_int_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void psi_1(double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_psi_1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void psi_n(int *m, double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_psi_n_e(m[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/gegenbauer.c0000644000176200001440000000340213446020402014070 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_gegenpoly_1_e goes to gegenpoly_1_e. */ void gegenpoly_1_e(const double *lambda, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gegenpoly_1_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gegenpoly_2_e(const double *lambda, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gegenpoly_2_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gegenpoly_3_e(const double *lambda, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gegenpoly_3_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gegenpoly_n_e(const int *n, const double *lambda, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gegenpoly_n_e(*n, lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gegenpoly_array(const int *nmax, const double *lambda, const double *x, const int *len, double *out, int *status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gegenpoly_array(*nmax, lambda[i], x[i], out+i*(*nmax+1) ) ; } } gsl/src/fermi_dirac.c0000644000176200001440000000553213446020402014236 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_fermi_dirac_m1_e goes to fermi_dirac_m1. */ void fermi_dirac_m1(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_m1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_0(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_1(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_2(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_int(const int *j, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_int_e(j[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_mhalf(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_mhalf_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_half(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_half_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_3half(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_3half_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_inc_0(const double *x, double *b, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_inc_0_e(x[i], b[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/coulomb.c0000644000176200001440000000737013446020402013434 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and _e from the end. */ void hydrogenicR_1(const double *Z, const double *r, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hydrogenicR_1_e(Z[i], r[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hydrogenicR(const int *n, const int *l, const double *Z, const double *r, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hydrogenicR_e(n[i], l[i], Z[i], r[i], &result) ; val[i] = result.val; err[i] = result.err; } } void coulomb_wave_FG(const double *eta, const double *x, const double *L_F, const int *k, const int *len, double *val_F , double *err_F , double *val_Fp , double *err_Fp , double *val_G , double *err_G , double *val_Gp , double *err_Gp , double *exp_F , double *exp_G , int *status) { int i; gsl_sf_result F; gsl_sf_result Fp; gsl_sf_result G; gsl_sf_result Gp; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_wave_FG_e(eta[i], x[i], L_F[i], k[i], &F, &Fp, &G, &Gp, exp_F+i, exp_G+i); val_F[i] = F.val; err_F[i] = F.err; val_Fp[i] = Fp.val; err_Fp[i] = Fp.err; val_G[i] = G.val; err_G[i] = G.err; val_Gp[i] = Gp.val; err_Gp[i] = Gp.err; } } void coulomb_wave_F_array(const double *L_min, const int *kmax, const double *eta, double *x, const int *len, double *fc_array, double *F_exponent, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_wave_F_array(*L_min, *kmax, eta[i], x[i], fc_array+i*(*kmax+1), F_exponent+i); } } void coulomb_wave_FG_array(const double *L_min, const int *kmax, const double *eta, double *x, const int *len, double *fc_array, double *gc_array, double *F_exponent, double *G_exponent, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_wave_FG_array(*L_min, *kmax, eta[i], x[i], fc_array+i*(*kmax+1), gc_array+i*(*kmax+1), F_exponent+i, G_exponent+i); } } void coulomb_wave_FGp_array(const double *L_min, const int *kmax, const double *eta, const double *x, const int *len, double *fc_array, double *fcp_array, double *gc_array, double *gcp_array, double *F_exponent, double *G_exponent, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_wave_FGp_array(*L_min, *kmax, eta[i], x[i], fc_array+i*(*kmax+1), fcp_array+i*(*kmax+1), gc_array+i*(*kmax+1), gcp_array+i*(*kmax+1), F_exponent+i, G_exponent+i); } } void coulomb_wave_sphF_array(const double *L_min, const int *kmax, const double *eta, double *x, const int *len, double *fc_array, double *F_exponent, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_wave_sphF_array(*L_min, *kmax, eta[i], x[i], fc_array+i*(*kmax+1), F_exponent+i); } } void coulomb_CL(const double *L, const double *eta, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_CL_e(L[i], eta[i], &result) ; val[i] = result.val; err[i] = result.err; } } void coulomb_CL_array(const double *L_min, const int *kmax, const double *eta, const int *len, double *cl, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_CL_array(*L_min, *kmax, eta[i], cl+i*(*kmax+1)); } } gsl/src/Makevars.win0000644000176200001440000000044313446020402014112 0ustar liggesusers# PKG_LIBS=-LF:/MinGW/usr/local/lib -lgsl -lgslcblas # CPPFLAGS=-I$(R_HOME)/include -IF:/MinGW/usr/local/include # PKG_CPPFLAGS=-IF:/MinGW/usr/local/include # lines below supplied by Brian Ripley and Uwe Ligges PKG_CPPFLAGS=-I$(LIB_GSL)/include PKG_LIBS=-L$(LIB_GSL)/lib -lgsl -lgslcblas gsl/src/init.c0000644000176200001440000010751013446020402012734 0ustar liggesusers#include #include #include // for NULL #include /* FIXME: Check these declarations against the C/Fortran source code. */ /* .C calls */ extern void airy_Ai_deriv_e(void *, void *, void *, void *, void *, void *); extern void airy_Ai_deriv_scaled_e(void *, void *, void *, void *, void *, void *); extern void airy_Ai_e(void *, void *, void *, void *, void *, void *); extern void airy_Ai_scaled_e(void *, void *, void *, void *, void *, void *); extern void airy_Bi_deriv_e(void *, void *, void *, void *, void *, void *); extern void airy_Bi_deriv_scaled_e(void *, void *, void *, void *, void *, void *); extern void airy_Bi_e(void *, void *, void *, void *, void *, void *); extern void airy_Bi_scaled_e(void *, void *, void *, void *, void *, void *); extern void airy_zero_Ai_deriv_e(void *, void *, void *, void *, void *); extern void airy_zero_Ai_e(void *, void *, void *, void *, void *); extern void airy_zero_Bi_deriv_e(void *, void *, void *, void *, void *); extern void airy_zero_Bi_e(void *, void *, void *, void *, void *); extern void atanint_e(void *, void *, void *, void *, void *); extern void bessel_I0_e(void *, void *, void *, void *, void *); extern void bessel_i0_scaled_e(void *, void *, void *, void *, void *); extern void bessel_I0_scaled_e(void *, void *, void *, void *, void *); extern void bessel_I1_e(void *, void *, void *, void *, void *); extern void bessel_i1_scaled_e(void *, void *, void *, void *, void *); extern void bessel_I1_scaled_e(void *, void *, void *, void *, void *); extern void bessel_i2_scaled_e(void *, void *, void *, void *, void *); extern void bessel_il_scaled_array_e(void *, void *, void *, void *, void *); extern void bessel_il_scaled_e(void *, void *, void *, void *, void *, void *); extern void bessel_In_array_e(void *, void *, void *, void *, void *, void *); extern void bessel_In_e(void *, void *, void *, void *, void *, void *); extern void bessel_In_scaled_array_e(void *, void *, void *, void *, void *, void *); extern void bessel_In_scaled_e(void *, void *, void *, void *, void *, void *); extern void bessel_Inu_e(void *, void *, void *, void *, void *, void *); extern void bessel_Inu_scaled_e(void *, void *, void *, void *, void *, void *); extern void bessel_j0_e(void *, void *, void *, void *, void *); extern void bessel_J0_e(void *, void *, void *, void *, void *); extern void bessel_j1_e(void *, void *, void *, void *, void *); extern void bessel_J1_e(void *, void *, void *, void *, void *); extern void bessel_j2_e(void *, void *, void *, void *, void *); extern void bessel_jl_array_e(void *, void *, void *, void *, void *); extern void bessel_jl_e(void *, void *, void *, void *, void *, void *); extern void bessel_jl_steed_array_e(void *, void *, void *, void *, void *); extern void bessel_Jn_array_e(void *, void *, void *, void *, void *, void *); extern void bessel_Jn_e(void *, void *, void *, void *, void *, void *); extern void bessel_Jnu_e(void *, void *, void *, void *, void *, void *); extern void bessel_K0_e(void *, void *, void *, void *, void *); extern void bessel_k0_scaled_e(void *, void *, void *, void *, void *); extern void bessel_K0_scaled_e(void *, void *, void *, void *, void *); extern void bessel_K1_e(void *, void *, void *, void *, void *); extern void bessel_k1_scaled_e(void *, void *, void *, void *, void *); extern void bessel_K1_scaled_e(void *, void *, void *, void *, void *); extern void bessel_k2_scaled_e(void *, void *, void *, void *, void *); extern void bessel_kl_scaled_array_e(void *, void *, void *, void *, void *); extern void bessel_kl_scaled_e(void *, void *, void *, void *, void *, void *); extern void bessel_Kn_array_e(void *, void *, void *, void *, void *, void *); extern void bessel_Kn_e(void *, void *, void *, void *, void *, void *); extern void bessel_Kn_scaled_array_e(void *, void *, void *, void *, void *, void *); extern void bessel_Kn_scaled_e(void *, void *, void *, void *, void *, void *); extern void bessel_Knu_e(void *, void *, void *, void *, void *, void *); extern void bessel_Knu_scaled_e(void *, void *, void *, void *, void *, void *); extern void bessel_lnKnu_e(void *, void *, void *, void *, void *, void *); extern void bessel_sequence_Jnu_e(void *, void *, void *, void *, void *); extern void bessel_y0_e(void *, void *, void *, void *, void *); extern void bessel_Y0_e(void *, void *, void *, void *, void *); extern void bessel_y1_e(void *, void *, void *, void *, void *); extern void bessel_Y1_e(void *, void *, void *, void *, void *); extern void bessel_y2_e(void *, void *, void *, void *, void *); extern void bessel_yl_array_e(void *, void *, void *, void *, void *); extern void bessel_yl_e(void *, void *, void *, void *, void *, void *); extern void bessel_Yn_array_e(void *, void *, void *, void *, void *, void *); extern void bessel_Yn_e(void *, void *, void *, void *, void *, void *); extern void bessel_Ynu_e(void *, void *, void *, void *, void *, void *); extern void bessel_zero_J0_e(void *, void *, void *, void *, void *); extern void bessel_zero_J1_e(void *, void *, void *, void *, void *); extern void bessel_zero_Jnu_e(void *, void *, void *, void *, void *, void *); extern void beta_e(void *, void *, void *, void *, void *, void *); extern void beta_inc_e(void *, void *, void *, void *, void *, void *, void *); extern void Chi_e(void *, void *, void *, void *, void *); extern void choose_e(void *, void *, void *, void *, void *, void *); extern void Ci_e(void *, void *, void *, void *, void *); extern void clausen_e(void *, void *, void *, void *, void *); extern void complex_cos_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void complex_dilog_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void complex_log_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void complex_logsin_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void complex_sin_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void conicalP_0_e(void *, void *, void *, void *, void *, void *); extern void conicalP_1_e(void *, void *, void *, void *, void *, void *); extern void conicalP_cyl_reg_e(void *, void *, void *, void *, void *, void *, void *); extern void conicalP_half_e(void *, void *, void *, void *, void *, void *); extern void conicalP_mhalf_e(void *, void *, void *, void *, void *, void *); extern void conicalP_sph_reg_e(void *, void *, void *, void *, void *, void *, void *); extern void cos_e(void *, void *, void *, void *, void *); extern void coulomb_CL(void *, void *, void *, void *, void *, void *); extern void coulomb_CL_array(void *, void *, void *, void *, void *, void *); extern void coulomb_wave_F_array(void *, void *, void *, void *, void *, void *, void *, void *); extern void coulomb_wave_FG(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void coulomb_wave_FG_array(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void coulomb_wave_FGp_array(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void coulomb_wave_sphF_array(void *, void *, void *, void *, void *, void *, void *, void *); extern void coupling_3j(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void coupling_6j(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void coupling_9j(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void dawson(void *, void *, void *, void *, void *); extern void debye_1(void *, void *, void *, void *, void *); extern void debye_2(void *, void *, void *, void *, void *); extern void debye_3(void *, void *, void *, void *, void *); extern void debye_4(void *, void *, void *, void *, void *); extern void dilog_e(void *, void *, void *, void *, void *); extern void doublefact_e(void *, void *, void *, void *, void *); extern void ellint_D_e(void *, void *, void *, void *, void *, void *, void *); extern void ellint_E_e(void *, void *, void *, void *, void *, void *, void *); extern void ellint_Ecomp_e(void *, void *, void *, void *, void *, void *); extern void ellint_F_e(void *, void *, void *, void *, void *, void *, void *); extern void ellint_Kcomp_e(void *, void *, void *, void *, void *, void *); extern void ellint_P_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void ellint_RC_e(void *, void *, void *, void *, void *, void *, void *); extern void ellint_RD_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void ellint_RF_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void ellint_RJ_e(void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void elljac_e(void *, void *, void *, void *, void *, void *, void *); extern void erf_e(void *, void *, void *, void *, void *, void *); extern void erf_Q_e(void *, void *, void *, void *, void *, void *); extern void erf_Z_e(void *, void *, void *, void *, void *, void *); extern void erfc_e(void *, void *, void *, void *, void *, void *); extern void eta(void *, void *, void *, void *, void *); extern void eta_int(void *, void *, void *, void *, void *); extern void expint_3_e(void *, void *, void *, void *, void *); extern void expint_E1_e(void *, void *, void *, void *, void *); extern void expint_E2_e(void *, void *, void *, void *, void *); extern void expint_Ei_e(void *, void *, void *, void *, void *); extern void expint_En_e(void *, void *, void *, void *, void *, void *); extern void fact_e(void *, void *, void *, void *, void *); extern void fermi_dirac_0(void *, void *, void *, void *, void *); extern void fermi_dirac_1(void *, void *, void *, void *, void *); extern void fermi_dirac_2(void *, void *, void *, void *, void *); extern void fermi_dirac_3half(void *, void *, void *, void *, void *); extern void fermi_dirac_half(void *, void *, void *, void *, void *); extern void fermi_dirac_inc_0(void *, void *, void *, void *, void *, void *); extern void fermi_dirac_int(void *, void *, void *, void *, void *, void *); extern void fermi_dirac_m1(void *, void *, void *, void *, void *); extern void fermi_dirac_mhalf(void *, void *, void *, void *, void *); extern void gamma_e(void *, void *, void *, void *, void *); extern void gamma_inc_e(void *, void *, void *, void *, void *, void *); extern void gamma_inc_P_e(void *, void *, void *, void *, void *, void *); extern void gamma_inc_Q_e(void *, void *, void *, void *, void *, void *); extern void gammainv_e(void *, void *, void *, void *, void *); extern void gammastar_e(void *, void *, void *, void *, void *); extern void gegenpoly_1_e(void *, void *, void *, void *, void *, void *); extern void gegenpoly_2_e(void *, void *, void *, void *, void *, void *); extern void gegenpoly_3_e(void *, void *, void *, void *, void *, void *); extern void gegenpoly_array(void *, void *, void *, void *, void *, void *); extern void gegenpoly_n_e(void *, void *, void *, void *, void *, void *, void *); extern void gsl_poly(void *, void *, void *, void *, void *); extern void hazard_e(void *, void *, void *, void *, void *, void *); extern void hydrogenicR(void *, void *, void *, void *, void *, void *, void *, void *); extern void hydrogenicR_1(void *, void *, void *, void *, void *, void *); extern void hyperg_0F1_e(void *, void *, void *, void *, void *, void *); extern void hyperg_1F1_e(void *, void *, void *, void *, void *, void *, void *); extern void hyperg_1F1_int_e(void *, void *, void *, void *, void *, void *, void *); extern void hyperg_2F0_e(void *, void *, void *, void *, void *, void *, void *); extern void hyperg_2F1_conj_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void hyperg_2F1_conj_renorm_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void hyperg_2F1_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void hyperg_2F1_renorm_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void hyperg_U_e(void *, void *, void *, void *, void *, void *, void *); extern void hyperg_U_int_e(void *, void *, void *, void *, void *, void *, void *); extern void hypot_e(void *, void *, void *, void *, void *, void *); extern void hzeta(void *, void *, void *, void *, void *, void *); extern void laguerre_1(void *, void *, void *, void *, void *, void *); extern void laguerre_2(void *, void *, void *, void *, void *, void *); extern void laguerre_3(void *, void *, void *, void *, void *, void *); extern void laguerre_n(void *, void *, void *, void *, void *, void *, void *); extern void lambert_W0(void *, void *, void *, void *, void *); extern void lambert_Wm1(void *, void *, void *, void *, void *); extern void legendre_array(void *, void *, void *, void *, void *, void *); extern void legendre_array_index(void *, void *, void *); extern void legendre_array_n(void *, void *); extern void legendre_deriv_alt_array(void *, void *, void *, void *, void *, void *, void *); extern void legendre_deriv_array(void *, void *, void *, void *, void *, void *, void *); extern void legendre_deriv2_alt_array(void *, void *, void *, void *, void *, void *, void *, void *); extern void legendre_deriv2_array(void *, void *, void *, void *, void *, void *, void *, void *); extern void legendre_H3d_0_e(void *, void *, void *, void *, void *, void *); extern void legendre_H3d_1_e(void *, void *, void *, void *, void *, void *); extern void legendre_H3d_array(void *, void *, void *, void *, void *, void *); extern void legendre_H3d_e(void *, void *, void *, void *, void *, void *, void *); extern void legendre_P1_e(void *, void *, void *, void *, void *); extern void legendre_P2_e(void *, void *, void *, void *, void *); extern void legendre_P3_e(void *, void *, void *, void *, void *); extern void legendre_Pl_array(void *, void *, void *, void *, void *); extern void legendre_Pl_e(void *, void *, void *, void *, void *, void *); extern void legendre_Plm_e(void *, void *, void *, void *, void *, void *, void *); extern void legendre_Q0_e(void *, void *, void *, void *, void *); extern void legendre_Q1_e(void *, void *, void *, void *, void *); extern void legendre_Ql_e(void *, void *, void *, void *, void *, void *); extern void legendre_sphPlm_e(void *, void *, void *, void *, void *, void *, void *); extern void lnbeta_e(void *, void *, void *, void *, void *, void *); extern void lnchoose_e(void *, void *, void *, void *, void *, void *); extern void lncosh_e(void *, void *, void *, void *, void *); extern void lndoublefact_e(void *, void *, void *, void *, void *); extern void lnfact_e(void *, void *, void *, void *, void *); extern void lngamma_complex_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void lngamma_e(void *, void *, void *, void *, void *); extern void lngamma_sgn_e(void *, void *, void *, void *, void *, void *); extern void lnpoch_e(void *, void *, void *, void *, void *, void *); extern void lnpoch_sgn_e(void *, void *, void *, void *, void *, void *, void *); extern void lnsinh_e(void *, void *, void *, void *, void *); extern void log_1plusx_e(void *, void *, void *, void *, void *); extern void log_1plusx_mx_e(void *, void *, void *, void *, void *); extern void log_abs_e(void *, void *, void *, void *, void *); extern void log_e(void *, void *, void *, void *, void *); extern void log_erfc_e(void *, void *, void *, void *, void *, void *); extern void poch_e(void *, void *, void *, void *, void *, void *); extern void pochrel_e(void *, void *, void *, void *, void *, void *); extern void pow_int(void *, void *, void *, void *, void *, void *); extern void psi(void *, void *, void *, void *, void *); extern void psi_1(void *, void *, void *, void *, void *); extern void psi_1_int(void *, void *, void *, void *, void *); extern void psi_1piy(void *, void *, void *, void *, void *); extern void psi_int(void *, void *, void *, void *, void *); extern void psi_n(void *, void *, void *, void *, void *, void *); extern void Shi_e(void *, void *, void *, void *, void *); extern void Si_e(void *, void *, void *, void *, void *); extern void sin_e(void *, void *, void *, void *, void *); extern void sinc_e(void *, void *, void *, void *, void *); extern void synchrotron_1(void *, void *, void *, void *, void *); extern void synchrotron_2(void *, void *, void *, void *, void *); extern void taylorcoeff_e(void *, void *, void *, void *, void *, void *); extern void transport_2(void *, void *, void *, void *, void *); extern void transport_3(void *, void *, void *, void *, void *); extern void transport_4(void *, void *, void *, void *, void *); extern void transport_5(void *, void *, void *, void *, void *); extern void zeta(void *, void *, void *, void *, void *); extern void zeta_int(void *, void *, void *, void *, void *); extern void zetam1(void *, void *, void *, void *, void *); extern void zetam1_int(void *, void *, void *, void *, void *); /* .Call calls */ extern SEXP get_n(SEXP, SEXP); extern SEXP qrng_alloc(SEXP, SEXP); extern SEXP qrng_clone(SEXP); extern SEXP qrng_init(SEXP); extern SEXP qrng_name(SEXP); extern SEXP qrng_size(SEXP); extern SEXP rng_alloc(SEXP); extern SEXP rng_clone(SEXP); extern SEXP rng_get(SEXP, SEXP); extern SEXP rng_max(SEXP); extern SEXP rng_min(SEXP); extern SEXP rng_name(SEXP); extern SEXP rng_set(SEXP, SEXP); extern SEXP rng_uniform(SEXP, SEXP); extern SEXP rng_uniform_int(SEXP, SEXP, SEXP); extern SEXP rng_uniform_pos(SEXP, SEXP); static const R_CMethodDef CEntries[] = { {"airy_Ai_deriv_e", (DL_FUNC) &airy_Ai_deriv_e, 6}, {"airy_Ai_deriv_scaled_e", (DL_FUNC) &airy_Ai_deriv_scaled_e, 6}, {"airy_Ai_e", (DL_FUNC) &airy_Ai_e, 6}, {"airy_Ai_scaled_e", (DL_FUNC) &airy_Ai_scaled_e, 6}, {"airy_Bi_deriv_e", (DL_FUNC) &airy_Bi_deriv_e, 6}, {"airy_Bi_deriv_scaled_e", (DL_FUNC) &airy_Bi_deriv_scaled_e, 6}, {"airy_Bi_e", (DL_FUNC) &airy_Bi_e, 6}, {"airy_Bi_scaled_e", (DL_FUNC) &airy_Bi_scaled_e, 6}, {"airy_zero_Ai_deriv_e", (DL_FUNC) &airy_zero_Ai_deriv_e, 5}, {"airy_zero_Ai_e", (DL_FUNC) &airy_zero_Ai_e, 5}, {"airy_zero_Bi_deriv_e", (DL_FUNC) &airy_zero_Bi_deriv_e, 5}, {"airy_zero_Bi_e", (DL_FUNC) &airy_zero_Bi_e, 5}, {"atanint_e", (DL_FUNC) &atanint_e, 5}, {"bessel_I0_e", (DL_FUNC) &bessel_I0_e, 5}, {"bessel_i0_scaled_e", (DL_FUNC) &bessel_i0_scaled_e, 5}, {"bessel_I0_scaled_e", (DL_FUNC) &bessel_I0_scaled_e, 5}, {"bessel_I1_e", (DL_FUNC) &bessel_I1_e, 5}, {"bessel_i1_scaled_e", (DL_FUNC) &bessel_i1_scaled_e, 5}, {"bessel_I1_scaled_e", (DL_FUNC) &bessel_I1_scaled_e, 5}, {"bessel_i2_scaled_e", (DL_FUNC) &bessel_i2_scaled_e, 5}, {"bessel_il_scaled_array_e", (DL_FUNC) &bessel_il_scaled_array_e, 5}, {"bessel_il_scaled_e", (DL_FUNC) &bessel_il_scaled_e, 6}, {"bessel_In_array_e", (DL_FUNC) &bessel_In_array_e, 6}, {"bessel_In_e", (DL_FUNC) &bessel_In_e, 6}, {"bessel_In_scaled_array_e", (DL_FUNC) &bessel_In_scaled_array_e, 6}, {"bessel_In_scaled_e", (DL_FUNC) &bessel_In_scaled_e, 6}, {"bessel_Inu_e", (DL_FUNC) &bessel_Inu_e, 6}, {"bessel_Inu_scaled_e", (DL_FUNC) &bessel_Inu_scaled_e, 6}, {"bessel_j0_e", (DL_FUNC) &bessel_j0_e, 5}, {"bessel_J0_e", (DL_FUNC) &bessel_J0_e, 5}, {"bessel_j1_e", (DL_FUNC) &bessel_j1_e, 5}, {"bessel_J1_e", (DL_FUNC) &bessel_J1_e, 5}, {"bessel_j2_e", (DL_FUNC) &bessel_j2_e, 5}, {"bessel_jl_array_e", (DL_FUNC) &bessel_jl_array_e, 5}, {"bessel_jl_e", (DL_FUNC) &bessel_jl_e, 6}, {"bessel_jl_steed_array_e", (DL_FUNC) &bessel_jl_steed_array_e, 5}, {"bessel_Jn_array_e", (DL_FUNC) &bessel_Jn_array_e, 6}, {"bessel_Jn_e", (DL_FUNC) &bessel_Jn_e, 6}, {"bessel_Jnu_e", (DL_FUNC) &bessel_Jnu_e, 6}, {"bessel_K0_e", (DL_FUNC) &bessel_K0_e, 5}, {"bessel_k0_scaled_e", (DL_FUNC) &bessel_k0_scaled_e, 5}, {"bessel_K0_scaled_e", (DL_FUNC) &bessel_K0_scaled_e, 5}, {"bessel_K1_e", (DL_FUNC) &bessel_K1_e, 5}, {"bessel_k1_scaled_e", (DL_FUNC) &bessel_k1_scaled_e, 5}, {"bessel_K1_scaled_e", (DL_FUNC) &bessel_K1_scaled_e, 5}, {"bessel_k2_scaled_e", (DL_FUNC) &bessel_k2_scaled_e, 5}, {"bessel_kl_scaled_array_e", (DL_FUNC) &bessel_kl_scaled_array_e, 5}, {"bessel_kl_scaled_e", (DL_FUNC) &bessel_kl_scaled_e, 6}, {"bessel_Kn_array_e", (DL_FUNC) &bessel_Kn_array_e, 6}, {"bessel_Kn_e", (DL_FUNC) &bessel_Kn_e, 6}, {"bessel_Kn_scaled_array_e", (DL_FUNC) &bessel_Kn_scaled_array_e, 6}, {"bessel_Kn_scaled_e", (DL_FUNC) &bessel_Kn_scaled_e, 6}, {"bessel_Knu_e", (DL_FUNC) &bessel_Knu_e, 6}, {"bessel_Knu_scaled_e", (DL_FUNC) &bessel_Knu_scaled_e, 6}, {"bessel_lnKnu_e", (DL_FUNC) &bessel_lnKnu_e, 6}, {"bessel_sequence_Jnu_e", (DL_FUNC) &bessel_sequence_Jnu_e, 5}, {"bessel_y0_e", (DL_FUNC) &bessel_y0_e, 5}, {"bessel_Y0_e", (DL_FUNC) &bessel_Y0_e, 5}, {"bessel_y1_e", (DL_FUNC) &bessel_y1_e, 5}, {"bessel_Y1_e", (DL_FUNC) &bessel_Y1_e, 5}, {"bessel_y2_e", (DL_FUNC) &bessel_y2_e, 5}, {"bessel_yl_array_e", (DL_FUNC) &bessel_yl_array_e, 5}, {"bessel_yl_e", (DL_FUNC) &bessel_yl_e, 6}, {"bessel_Yn_array_e", (DL_FUNC) &bessel_Yn_array_e, 6}, {"bessel_Yn_e", (DL_FUNC) &bessel_Yn_e, 6}, {"bessel_Ynu_e", (DL_FUNC) &bessel_Ynu_e, 6}, {"bessel_zero_J0_e", (DL_FUNC) &bessel_zero_J0_e, 5}, {"bessel_zero_J1_e", (DL_FUNC) &bessel_zero_J1_e, 5}, {"bessel_zero_Jnu_e", (DL_FUNC) &bessel_zero_Jnu_e, 6}, {"beta_e", (DL_FUNC) &beta_e, 6}, {"beta_inc_e", (DL_FUNC) &beta_inc_e, 7}, {"Chi_e", (DL_FUNC) &Chi_e, 5}, {"choose_e", (DL_FUNC) &choose_e, 6}, {"Ci_e", (DL_FUNC) &Ci_e, 5}, {"clausen_e", (DL_FUNC) &clausen_e, 5}, {"complex_cos_e", (DL_FUNC) &complex_cos_e, 8}, {"complex_dilog_e", (DL_FUNC) &complex_dilog_e, 8}, {"complex_log_e", (DL_FUNC) &complex_log_e, 8}, {"complex_logsin_e", (DL_FUNC) &complex_logsin_e, 8}, {"complex_sin_e", (DL_FUNC) &complex_sin_e, 8}, {"conicalP_0_e", (DL_FUNC) &conicalP_0_e, 6}, {"conicalP_1_e", (DL_FUNC) &conicalP_1_e, 6}, {"conicalP_cyl_reg_e", (DL_FUNC) &conicalP_cyl_reg_e, 7}, {"conicalP_half_e", (DL_FUNC) &conicalP_half_e, 6}, {"conicalP_mhalf_e", (DL_FUNC) &conicalP_mhalf_e, 6}, {"conicalP_sph_reg_e", (DL_FUNC) &conicalP_sph_reg_e, 7}, {"cos_e", (DL_FUNC) &cos_e, 5}, {"coulomb_CL", (DL_FUNC) &coulomb_CL, 6}, {"coulomb_CL_array", (DL_FUNC) &coulomb_CL_array, 6}, {"coulomb_wave_F_array", (DL_FUNC) &coulomb_wave_F_array, 8}, {"coulomb_wave_FG", (DL_FUNC) &coulomb_wave_FG, 16}, {"coulomb_wave_FG_array", (DL_FUNC) &coulomb_wave_FG_array, 10}, {"coulomb_wave_FGp_array", (DL_FUNC) &coulomb_wave_FGp_array, 12}, {"coulomb_wave_sphF_array", (DL_FUNC) &coulomb_wave_sphF_array, 8}, {"coupling_3j", (DL_FUNC) &coupling_3j, 10}, {"coupling_6j", (DL_FUNC) &coupling_6j, 10}, {"coupling_9j", (DL_FUNC) &coupling_9j, 13}, {"dawson", (DL_FUNC) &dawson, 5}, {"debye_1", (DL_FUNC) &debye_1, 5}, {"debye_2", (DL_FUNC) &debye_2, 5}, {"debye_3", (DL_FUNC) &debye_3, 5}, {"debye_4", (DL_FUNC) &debye_4, 5}, {"dilog_e", (DL_FUNC) &dilog_e, 5}, {"doublefact_e", (DL_FUNC) &doublefact_e, 5}, {"ellint_D_e", (DL_FUNC) &ellint_D_e, 7}, {"ellint_E_e", (DL_FUNC) &ellint_E_e, 7}, {"ellint_Ecomp_e", (DL_FUNC) &ellint_Ecomp_e, 6}, {"ellint_F_e", (DL_FUNC) &ellint_F_e, 7}, {"ellint_Kcomp_e", (DL_FUNC) &ellint_Kcomp_e, 6}, {"ellint_P_e", (DL_FUNC) &ellint_P_e, 8}, {"ellint_RC_e", (DL_FUNC) &ellint_RC_e, 7}, {"ellint_RD_e", (DL_FUNC) &ellint_RD_e, 8}, {"ellint_RF_e", (DL_FUNC) &ellint_RF_e, 8}, {"ellint_RJ_e", (DL_FUNC) &ellint_RJ_e, 9}, {"elljac_e", (DL_FUNC) &elljac_e, 7}, {"erf_e", (DL_FUNC) &erf_e, 6}, {"erf_Q_e", (DL_FUNC) &erf_Q_e, 6}, {"erf_Z_e", (DL_FUNC) &erf_Z_e, 6}, {"erfc_e", (DL_FUNC) &erfc_e, 6}, {"eta", (DL_FUNC) &eta, 5}, {"eta_int", (DL_FUNC) &eta_int, 5}, {"expint_3_e", (DL_FUNC) &expint_3_e, 5}, {"expint_E1_e", (DL_FUNC) &expint_E1_e, 5}, {"expint_E2_e", (DL_FUNC) &expint_E2_e, 5}, {"expint_Ei_e", (DL_FUNC) &expint_Ei_e, 5}, {"expint_En_e", (DL_FUNC) &expint_En_e, 6}, {"fact_e", (DL_FUNC) &fact_e, 5}, {"fermi_dirac_0", (DL_FUNC) &fermi_dirac_0, 5}, {"fermi_dirac_1", (DL_FUNC) &fermi_dirac_1, 5}, {"fermi_dirac_2", (DL_FUNC) &fermi_dirac_2, 5}, {"fermi_dirac_3half", (DL_FUNC) &fermi_dirac_3half, 5}, {"fermi_dirac_half", (DL_FUNC) &fermi_dirac_half, 5}, {"fermi_dirac_inc_0", (DL_FUNC) &fermi_dirac_inc_0, 6}, {"fermi_dirac_int", (DL_FUNC) &fermi_dirac_int, 6}, {"fermi_dirac_m1", (DL_FUNC) &fermi_dirac_m1, 5}, {"fermi_dirac_mhalf", (DL_FUNC) &fermi_dirac_mhalf, 5}, {"gamma_e", (DL_FUNC) &gamma_e, 5}, {"gamma_inc_e", (DL_FUNC) &gamma_inc_e, 6}, {"gamma_inc_P_e", (DL_FUNC) &gamma_inc_P_e, 6}, {"gamma_inc_Q_e", (DL_FUNC) &gamma_inc_Q_e, 6}, {"gammainv_e", (DL_FUNC) &gammainv_e, 5}, {"gammastar_e", (DL_FUNC) &gammastar_e, 5}, {"gegenpoly_1_e", (DL_FUNC) &gegenpoly_1_e, 6}, {"gegenpoly_2_e", (DL_FUNC) &gegenpoly_2_e, 6}, {"gegenpoly_3_e", (DL_FUNC) &gegenpoly_3_e, 6}, {"gegenpoly_array", (DL_FUNC) &gegenpoly_array, 6}, {"gegenpoly_n_e", (DL_FUNC) &gegenpoly_n_e, 7}, {"gsl_poly", (DL_FUNC) &gsl_poly, 5}, {"hazard_e", (DL_FUNC) &hazard_e, 6}, {"hydrogenicR", (DL_FUNC) &hydrogenicR, 8}, {"hydrogenicR_1", (DL_FUNC) &hydrogenicR_1, 6}, {"hyperg_0F1_e", (DL_FUNC) &hyperg_0F1_e, 6}, {"hyperg_1F1_e", (DL_FUNC) &hyperg_1F1_e, 7}, {"hyperg_1F1_int_e", (DL_FUNC) &hyperg_1F1_int_e, 7}, {"hyperg_2F0_e", (DL_FUNC) &hyperg_2F0_e, 7}, {"hyperg_2F1_conj_e", (DL_FUNC) &hyperg_2F1_conj_e, 8}, {"hyperg_2F1_conj_renorm_e", (DL_FUNC) &hyperg_2F1_conj_renorm_e, 8}, {"hyperg_2F1_e", (DL_FUNC) &hyperg_2F1_e, 8}, {"hyperg_2F1_renorm_e", (DL_FUNC) &hyperg_2F1_renorm_e, 8}, {"hyperg_U_e", (DL_FUNC) &hyperg_U_e, 7}, {"hyperg_U_int_e", (DL_FUNC) &hyperg_U_int_e, 7}, {"hypot_e", (DL_FUNC) &hypot_e, 6}, {"hzeta", (DL_FUNC) &hzeta, 6}, {"laguerre_1", (DL_FUNC) &laguerre_1, 6}, {"laguerre_2", (DL_FUNC) &laguerre_2, 6}, {"laguerre_3", (DL_FUNC) &laguerre_3, 6}, {"laguerre_n", (DL_FUNC) &laguerre_n, 7}, {"lambert_W0", (DL_FUNC) &lambert_W0, 5}, {"lambert_Wm1", (DL_FUNC) &lambert_Wm1, 5}, {"legendre_array", (DL_FUNC) &legendre_array, 6}, {"legendre_array_index", (DL_FUNC) &legendre_array_index, 3}, {"legendre_array_n", (DL_FUNC) &legendre_array_n, 2}, {"legendre_deriv_alt_array", (DL_FUNC) &legendre_deriv_alt_array, 7}, {"legendre_deriv_array", (DL_FUNC) &legendre_deriv_array, 7}, {"legendre_deriv2_alt_array", (DL_FUNC) &legendre_deriv2_alt_array, 8}, {"legendre_deriv2_array", (DL_FUNC) &legendre_deriv2_array, 8}, {"legendre_H3d_0_e", (DL_FUNC) &legendre_H3d_0_e, 6}, {"legendre_H3d_1_e", (DL_FUNC) &legendre_H3d_1_e, 6}, {"legendre_H3d_array", (DL_FUNC) &legendre_H3d_array, 6}, {"legendre_H3d_e", (DL_FUNC) &legendre_H3d_e, 7}, {"legendre_P1_e", (DL_FUNC) &legendre_P1_e, 5}, {"legendre_P2_e", (DL_FUNC) &legendre_P2_e, 5}, {"legendre_P3_e", (DL_FUNC) &legendre_P3_e, 5}, {"legendre_Pl_array", (DL_FUNC) &legendre_Pl_array, 5}, {"legendre_Pl_e", (DL_FUNC) &legendre_Pl_e, 6}, {"legendre_Plm_e", (DL_FUNC) &legendre_Plm_e, 7}, {"legendre_Q0_e", (DL_FUNC) &legendre_Q0_e, 5}, {"legendre_Q1_e", (DL_FUNC) &legendre_Q1_e, 5}, {"legendre_Ql_e", (DL_FUNC) &legendre_Ql_e, 6}, {"legendre_sphPlm_e", (DL_FUNC) &legendre_sphPlm_e, 7}, {"lnbeta_e", (DL_FUNC) &lnbeta_e, 6}, {"lnchoose_e", (DL_FUNC) &lnchoose_e, 6}, {"lncosh_e", (DL_FUNC) &lncosh_e, 5}, {"lndoublefact_e", (DL_FUNC) &lndoublefact_e, 5}, {"lnfact_e", (DL_FUNC) &lnfact_e, 5}, {"lngamma_complex_e", (DL_FUNC) &lngamma_complex_e, 8}, {"lngamma_e", (DL_FUNC) &lngamma_e, 5}, {"lngamma_sgn_e", (DL_FUNC) &lngamma_sgn_e, 6}, {"lnpoch_e", (DL_FUNC) &lnpoch_e, 6}, {"lnpoch_sgn_e", (DL_FUNC) &lnpoch_sgn_e, 7}, {"lnsinh_e", (DL_FUNC) &lnsinh_e, 5}, {"log_1plusx_e", (DL_FUNC) &log_1plusx_e, 5}, {"log_1plusx_mx_e", (DL_FUNC) &log_1plusx_mx_e, 5}, {"log_abs_e", (DL_FUNC) &log_abs_e, 5}, {"log_e", (DL_FUNC) &log_e, 5}, {"log_erfc_e", (DL_FUNC) &log_erfc_e, 6}, {"poch_e", (DL_FUNC) &poch_e, 6}, {"pochrel_e", (DL_FUNC) &pochrel_e, 6}, {"pow_int", (DL_FUNC) &pow_int, 6}, {"psi", (DL_FUNC) &psi, 5}, {"psi_1", (DL_FUNC) &psi_1, 5}, {"psi_1_int", (DL_FUNC) &psi_1_int, 5}, {"psi_1piy", (DL_FUNC) &psi_1piy, 5}, {"psi_int", (DL_FUNC) &psi_int, 5}, {"psi_n", (DL_FUNC) &psi_n, 6}, {"Shi_e", (DL_FUNC) &Shi_e, 5}, {"Si_e", (DL_FUNC) &Si_e, 5}, {"sin_e", (DL_FUNC) &sin_e, 5}, {"sinc_e", (DL_FUNC) &sinc_e, 5}, {"synchrotron_1", (DL_FUNC) &synchrotron_1, 5}, {"synchrotron_2", (DL_FUNC) &synchrotron_2, 5}, {"taylorcoeff_e", (DL_FUNC) &taylorcoeff_e, 6}, {"transport_2", (DL_FUNC) &transport_2, 5}, {"transport_3", (DL_FUNC) &transport_3, 5}, {"transport_4", (DL_FUNC) &transport_4, 5}, {"transport_5", (DL_FUNC) &transport_5, 5}, {"zeta", (DL_FUNC) &zeta, 5}, {"zeta_int", (DL_FUNC) &zeta_int, 5}, {"zetam1", (DL_FUNC) &zetam1, 5}, {"zetam1_int", (DL_FUNC) &zetam1_int, 5}, {NULL, NULL, 0} }; static const R_CallMethodDef CallEntries[] = { {"get_n", (DL_FUNC) &get_n, 2}, {"qrng_alloc", (DL_FUNC) &qrng_alloc, 2}, {"qrng_clone", (DL_FUNC) &qrng_clone, 1}, {"qrng_init", (DL_FUNC) &qrng_init, 1}, {"qrng_name", (DL_FUNC) &qrng_name, 1}, {"qrng_size", (DL_FUNC) &qrng_size, 1}, {"rng_alloc", (DL_FUNC) &rng_alloc, 1}, {"rng_clone", (DL_FUNC) &rng_clone, 1}, {"rng_get", (DL_FUNC) &rng_get, 2}, {"rng_max", (DL_FUNC) &rng_max, 1}, {"rng_min", (DL_FUNC) &rng_min, 1}, {"rng_name", (DL_FUNC) &rng_name, 1}, {"rng_set", (DL_FUNC) &rng_set, 2}, {"rng_uniform", (DL_FUNC) &rng_uniform, 2}, {"rng_uniform_int", (DL_FUNC) &rng_uniform_int, 3}, {"rng_uniform_pos", (DL_FUNC) &rng_uniform_pos, 2}, {NULL, NULL, 0} }; void R_init_gsl(DllInfo *dll) { R_registerRoutines(dll, CEntries, CallEntries, NULL, NULL); R_useDynamicSymbols(dll, FALSE); } gsl/src/legendre.c0000644000176200001440000002634713446020402013566 0ustar liggesusers#include #include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_legendre_P1 goes to legendre_P1. */ /* following specifies the normalization mode for functions like gsl_sf_legendre_array(), as specified in the gsl-ref manual (currently 7.24.2, "Associated Legendre Polynomials and Spherical Harmonics") */ const gsl_sf_legendre_t legendre_norm[] = { GSL_SF_LEGENDRE_NONE , GSL_SF_LEGENDRE_SCHMIDT , GSL_SF_LEGENDRE_SPHARM , GSL_SF_LEGENDRE_FULL }; void legendre_P1(const double *x, const int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_P1(x[i]); } } void legendre_P1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_P1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_P2(const double *x, const int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_P2(x[i]); } } void legendre_P2_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_P2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_P3(const double *x, const int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_P3(x[i]); } } void legendre_P3_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_P3_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_Pl(const int *l, const double *x, const int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_Pl(*l, x[i]); } } void legendre_Pl_e(const int *l, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_Pl_e(*l, x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_Pl_array(const int *lmax, const double* x, const int* len, double* out, int* status) { int i; gsl_set_error_handler_off(); for(i=0 ; i< *len ; i++) { status[i] = gsl_sf_legendre_Pl_array(*lmax, x[i], out+i*(*lmax+1)); } } void legendre_Q0(const double *x, const int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_Q0(x[i]); } } void legendre_Q0_e(double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_Q0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_Q1(double *x, int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_Q1(x[i]); } } void legendre_Q1_e(double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_Q1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_Ql(int *l, double *x, int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_Ql(*l, x[i]); } } void legendre_Ql_e(int *l, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_Ql_e(*l, x[i], &result) ; val[i] = result.val; err[i] = result.err; } } /* put legendre_array_n() and legendre_array_index() first [even though they appear in the manual later] for ease of understanding */ void legendre_array_n(const int *lmax, int *ans){ *ans = (int) gsl_sf_legendre_array_n((size_t) *lmax); } void legendre_array_index(const int *l, const int *m, int *ans){ *ans = gsl_sf_legendre_array_index( (size_t) *l, (size_t) *m); } void legendre_array(const double *x, const int *lmax, const int *norm, const double *csphase, double *result_array, double *out) { gsl_set_error_handler_off(); gsl_sf_legendre_array_e(legendre_norm[(size_t) *norm], (size_t) *lmax, *x, *csphase, result_array); for(size_t l=0 ; l <= (*lmax) ; l++){ /*sic, need l=lmax */ for(size_t m=0 ; m <= l ; m++){ out[(*lmax+1)*m + l] = result_array[gsl_sf_legendre_array_index(l, m)]; } } } void legendre_deriv_array(const double *x, const int *lmax, const int *norm, const double *csphase, double *result_array, double *result_deriv_array, double *out) { gsl_set_error_handler_off(); gsl_sf_legendre_deriv_array_e(legendre_norm[(size_t) *norm], (size_t) *lmax, *x, *csphase, result_array, result_deriv_array); for(size_t l=0 ; l <= (*lmax) ; l++){ /*sic, need l=lmax */ for(size_t m=0 ; m <= l ; m++){ out[(*lmax+1)*m + l] = result_deriv_array[gsl_sf_legendre_array_index(l, m)]; } } } void legendre_deriv_alt_array(const double *x, const int *lmax, const int *norm, const double *csphase, double *result_array, double *result_deriv_array, double *out) { gsl_set_error_handler_off(); gsl_sf_legendre_deriv_alt_array_e(legendre_norm[(size_t) *norm], (size_t) *lmax, *x, *csphase, result_array, result_deriv_array); for(size_t l=0 ; l <= (*lmax) ; l++){ /*sic, need l=lmax */ for(size_t m=0 ; m <= l ; m++){ out[(*lmax+1)*m + l] = result_deriv_array[gsl_sf_legendre_array_index(l, m)]; } } } void legendre_deriv2_array(const double *x, const int *lmax, const int *norm, const double *csphase, double *result_array, double *result_deriv_array, double *result_deriv2_array, double *out) { gsl_set_error_handler_off(); gsl_sf_legendre_deriv2_array_e(legendre_norm[(size_t) *norm], (size_t) *lmax, *x, *csphase, result_array, result_deriv_array, result_deriv2_array); for(size_t l=0 ; l <= (*lmax) ; l++){ /*sic, need l=lmax */ for(size_t m=0 ; m <= l ; m++){ out[(*lmax+1)*m + l] = result_deriv2_array[gsl_sf_legendre_array_index(l, m)]; } } } void legendre_deriv2_alt_array(const double *x, const int *lmax, const int *norm, const double *csphase, double *result_array, double *result_deriv_array, double *result_deriv2_array, double *out) { gsl_set_error_handler_off(); gsl_sf_legendre_deriv2_alt_array_e(legendre_norm[(size_t) *norm], (size_t) *lmax, *x, *csphase, result_array, result_deriv_array, result_deriv2_array); for(size_t l=0 ; l <= (*lmax) ; l++){ /*sic, need l=lmax */ for(size_t m=0 ; m <= l ; m++){ out[(*lmax+1)*m + l] = result_deriv2_array[gsl_sf_legendre_array_index(l, m)]; } } } void legendre_Plm(int *l, int *m, double *x, int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_Plm(*l, *m, x[i]); } } void legendre_Plm_e(int *l, int *m, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_Plm_e(*l, *m, x[i], &result) ; val[i] = result.val; err[i] = result.err; } } /* void legendre_Plm_array(int *lmax, int *m, double* x, int* len, double* out, int* status) // deprecated { int i; gsl_set_error_handler_off(); for(i=0 ; i< *len ; i++) { status[i] = gsl_sf_legendre_Plm_array(*lmax, *m, x[i], out+i*(*lmax- *m +1)); } } */ void legendre_sphPlm(int *l, int *m, double *x, int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_sphPlm(*l, *m, x[i]); } } void legendre_sphPlm_e(int *l, int *m, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_sphPlm_e(*l, *m, x[i], &result) ; val[i] = result.val; err[i] = result.err; } } /* void legendre_sphPlm_array(int *lmax, int *m, double* x, int* len, double* out, int* status) //deprecated { int i; gsl_set_error_handler_off(); for(i=0 ; i< *len ; i++) { status[i] = gsl_sf_legendre_Plm_array(*lmax, *m, x[i], out+i*(*lmax- *m +1)); } } */ void conicalP_half_e(double *lambda, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_conicalP_half_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void conicalP_mhalf_e(double *lambda, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_conicalP_mhalf_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void conicalP_0_e(double *lambda, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_conicalP_0_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void conicalP_1_e(double *lambda, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_conicalP_1_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void conicalP_sph_reg_e(int *l, double *lambda, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_conicalP_sph_reg_e(l[i], lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void conicalP_cyl_reg_e(int *m, double *lambda, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_conicalP_sph_reg_e(m[i], lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_H3d_0_e(double *lambda, double *eta, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_H3d_0_e(lambda[i], eta[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_H3d_1_e(double *lambda, double *eta, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_H3d_1_e(lambda[i], eta[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_H3d_e(int *l, double *lambda, double *eta, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_H3d_e(l[i], lambda[i], eta[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_H3d_array(int *lmax, double *lambda, double *eta, int *len, double* out, int* status) { int i; gsl_set_error_handler_off(); for(i=0 ; i< *len ; i++) { status[i] = gsl_sf_legendre_H3d_array(*lmax, lambda[i], eta[i], out+i*(*lmax+1)); } } gsl/src/airy.c0000644000176200001440000000767313446020402012746 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_airy_Ai goes to airy_Ai. */ static int sf_mode[] = { GSL_PREC_DOUBLE, GSL_PREC_SINGLE, GSL_PREC_APPROX } ; void airy_Ai_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Ai_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Bi_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Bi_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Ai_scaled_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Ai_scaled_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Bi_scaled_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Bi_scaled_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Ai_deriv_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Ai_deriv_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Bi_deriv_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Bi_deriv_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Ai_deriv_scaled_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Ai_deriv_scaled_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Bi_deriv_scaled_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Bi_deriv_scaled_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_zero_Ai_e(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ if(n[i]>0){ status[i] = gsl_sf_airy_zero_Ai_e(n[i], &result) ; } else { result.val=0.0; result.err=GSL_EDOM; } val[i] = result.val; err[i] = result.err; } } void airy_zero_Bi_e(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ if(n[i]>0){ status[i] = gsl_sf_airy_zero_Bi_e(n[i], &result) ; } else { result.val=0.0; result.err=GSL_EDOM; } val[i] = result.val; err[i] = result.err; } } void airy_zero_Ai_deriv_e(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ if(n[i]>0){ status[i] = gsl_sf_airy_zero_Ai_deriv_e(n[i], &result) ; } else { result.val=0.0; result.err=GSL_EDOM; } val[i] = result.val; err[i] = result.err; } } void airy_zero_Bi_deriv_e(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ if(n[i]>0){ status[i] = gsl_sf_airy_zero_Bi_deriv_e(n[i], &result) ; } else { result.val=0.0; result.err=GSL_EDOM; } val[i] = result.val; err[i] = result.err; } } gsl/src/expint.c0000644000176200001440000000607113446020402013300 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_expint_W0 goes to expint_W0. */ void expint_E1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_expint_E1_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void expint_E2_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_expint_E2_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void expint_En_e(const int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_expint_En_e(n[i], x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void expint_Ei_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_expint_Ei_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void Shi_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_Shi_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void Chi_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_Chi_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void expint_3_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_expint_3_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void Si_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_Si_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void Ci_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_Ci_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void atanint_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_atanint_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/log.c0000644000176200001440000000341513446020402012551 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning, of the name. Thus gsl_sf_log_e goes to log_e and gsl_sf_complex_log_e goes to complex_log_e. */ void log_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_log_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void log_abs_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_log_abs_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void complex_log_e(const double *zr, const double *zi, const int *len, double *val_lnr, double *val_arg, double *err_lnr, double *err_arg, int *status) { int i; gsl_sf_result lnr; gsl_sf_result arg; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_complex_log_e(zr[i], zi[i], &lnr, &arg) ; val_lnr[i] = lnr.val; val_arg[i] = arg.val; err_lnr[i] = lnr.err; err_arg[i] = arg.err; } } void log_1plusx_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_log_1plusx_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void log_1plusx_mx_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_log_1plusx_mx_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/trig.c0000644000176200001440000000607013446020402012735 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_sin_e goes to sin_e. */ void sin_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_sin_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void cos_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_cos_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void hypot_e(const double *x, double *y, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hypot_e(x[i], y[i], &result) ; val[i] = result.val; err[i] = result.err; } } void sinc_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_sinc_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void complex_sin_e(double *zr, double *zi, const int *len, double *val_lnr, double *val_arg, double *err_lnr, double *err_arg, int *status) { int i; gsl_sf_result lnr; gsl_sf_result arg; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_complex_sin_e(zr[i], zi[i], &lnr, &arg) ; val_lnr[i] = lnr.val; val_arg[i] = arg.val; err_lnr[i] = lnr.err; err_arg[i] = arg.err; } } void complex_cos_e(double *zr, double *zi, const int *len, double *val_lnr, double *val_arg, double *err_lnr, double *err_arg, int *status) { int i; gsl_sf_result lnr; gsl_sf_result arg; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_complex_cos_e(zr[i], zi[i], &lnr, &arg) ; val_lnr[i] = lnr.val; val_arg[i] = arg.val; err_lnr[i] = lnr.err; err_arg[i] = arg.err; } } void complex_logsin_e(double *zr, double *zi, const int *len, double *val_lnr, double *val_arg, double *err_lnr, double *err_arg, int *status) { int i; gsl_sf_result lnr; gsl_sf_result arg; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_complex_logsin_e(zr[i], zi[i], &lnr, &arg) ; val_lnr[i] = lnr.val; val_arg[i] = arg.val; err_lnr[i] = lnr.err; err_arg[i] = arg.err; } } void lnsinh_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lnsinh_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void lncosh_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lncosh_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/zeta.c0000644000176200001440000000414413446020402012733 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_zeta_int_e goes to zeta. */ void zeta_int(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_zeta_int_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void zeta(double *s, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_zeta_e(s[i], &result) ; val[i] = result.val; err[i] = result.err; } } void zetam1_int(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_zetam1_int_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void zetam1(const double *s, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_zetam1_e(s[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hzeta(const double *s, const double *q, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hzeta_e(s[i], q[i], &result) ; val[i] = result.val; err[i] = result.err; } } void eta_int(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_eta_int_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void eta(const double *s, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_eta_e(s[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/dilog.c0000644000176200001440000000157213446020402013070 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_dilog_e goes to dilog_e. */ void dilog_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_dilog_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void complex_dilog_e(const double *r, const double *theta, const int *len, double *val_re, double *val_im, double *err_re, double *err_im, int *status) { int i; gsl_sf_result re; gsl_sf_result im; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_complex_dilog_e(r[i], theta[i], &re, &im) ; val_re[i] = re.val; val_im[i] = im.val; err_re[i] = re.err; err_im[i] = im.err; } } gsl/NAMESPACE0000644000176200001440000001377213443537314012277 0ustar liggesusersexport("airy_Ai") export("airy_Ai_deriv") export("airy_Ai_deriv_scaled") export("airy_Ai_scaled") export("airy_Bi") export("airy_Bi_deriv") export("airy_Bi_deriv_scaled") export("airy_Bi_scaled") export("airy_zero_Ai") export("airy_zero_Ai_deriv") export("airy_zero_Bi") export("airy_zero_Bi_deriv") export("atanint") export("bessel_I0") export("bessel_i0_scaled") export("bessel_I0_scaled") export("bessel_I1") export("bessel_i1_scaled") export("bessel_I1_scaled") export("bessel_i2_scaled") export("bessel_il_scaled") export("bessel_il_scaled_array") export("bessel_In") export("bessel_In_array") export("bessel_In_scaled") export("bessel_In_scaled_array") export("bessel_Inu") export("bessel_Inu_scaled") export("bessel_j0") export("bessel_J0") export("bessel_j1") export("bessel_J1") export("bessel_j2") export("bessel_jl") export("bessel_jl_array") export("bessel_jl_steed_array") export("bessel_Jn") export("bessel_Jn_array") export("bessel_Jnu") export("bessel_K0") export("bessel_k0_scaled") export("bessel_K0_scaled") export("bessel_K1") export("bessel_k1_scaled") export("bessel_K1_scaled") export("bessel_k2_scaled") export("bessel_kl_scaled") export("bessel_kl_scaled_array") export("bessel_Kn") export("bessel_Kn_array") export("bessel_Kn_scaled") export("bessel_Kn_scaled_array") export("bessel_Knu") export("bessel_Knu_scaled") export("bessel_lnKnu") export("bessel_sequence_Jnu") export("bessel_y0") export("bessel_Y0") export("bessel_y1") export("bessel_Y1") export("bessel_y2") export("bessel_yl") export("bessel_yl_array") export("bessel_Yn") export("bessel_Yn_array") export("bessel_Ynu") export("bessel_zero_J0") export("bessel_zero_J1") export("bessel_zero_Jnu") export("beta_inc") export("Chi") export("Ci") export("clausen") export("complex_cos") export("complex_dilog") export("complex_log") export("complex_logsin") export("complex_sin") export("conicalP_0") export("conicalP_1") export("conicalP_cyl_reg") export("conicalP_half") export("conicalP_mhalf") export("conicalP_sph_reg") export("coulomb_CL") export("coulomb_CL_array") export("coulomb_wave_F_array") export("coulomb_wave_FG") export("coulomb_wave_FG_array") export("coulomb_wave_FGp_array") export("coulomb_wave_sphF_array") export("coupling_3j") export("coupling_6j") export("coupling_9j") export("dawson") export("debye_1") export("debye_2") export("debye_3") export("debye_4") export("deprecated_legendre") export("dilog") export("doublefact") export("ellint_D") export("ellint_E") export("ellint_Ecomp") export("ellint_F") export("ellint_Kcomp") export("ellint_P") export("ellint_RC") export("ellint_RD") export("ellint_RF") export("ellint_RJ") export("elljac") export("erf") export("erf_Q") export("erf_Z") export("erfc") export("eta") export("eta_int") export("expint_3") export("expint_E1") export("expint_E2") export("expint_Ei") export("expint_En") export("fact") export("fermi_dirac_0") export("fermi_dirac_1") export("fermi_dirac_2") export("fermi_dirac_3half") export("fermi_dirac_half") export("fermi_dirac_inc_0") export("fermi_dirac_int") export("fermi_dirac_m1") export("fermi_dirac_mhalf") export("gamma_inc") export("gamma_inc_P") export("gamma_inc_Q") export("gammainv") export("gammastar") export("gegenpoly_1") export("gegenpoly_2") export("gegenpoly_3") export("gegenpoly_array") export("gegenpoly_n") export("gsl_cd") export("gsl_cn") export("gsl_cs") export("gsl_dc") export("gsl_dn") export("gsl_ds") export("gsl_nc") export("gsl_nd") export("gsl_ns") export("gsl_poly") export("gsl_sc") export("gsl_sd") export("gsl_sf_beta") export("gsl_sf_choose") export("gsl_sf_cos") export("gsl_sf_gamma") export("gsl_sf_log") export("gsl_sf_sin") export("gsl_sn") export("hazard") export("hydrogenicR") export("hydrogenicR_1") export("hyperg_0F1") export("hyperg_1F1") export("hyperg_1F1_int") export("hyperg_2F0") export("hyperg_2F1") export("hyperg_2F1_conj") export("hyperg_2F1_conj_renorm") export("hyperg_2F1_renorm") export("hyperg_U") export("hyperg_U_int") export("hypot") export("hzeta") export("laguerre_1") export("laguerre_2") export("laguerre_3") export("laguerre_n") export("lambert_W0") export("lambert_Wm1") export("legendre_array") export("legendre_array_index") export("legendre_array_n") export("legendre_array_size") export("legendre_check_args") export("legendre_deriv_alt_array") export("legendre_deriv_array") export("legendre_deriv2_alt_array") export("legendre_deriv2_array") export("legendre_H3d") export("legendre_H3d_0") export("legendre_H3d_1") export("legendre_H3d_array") export("legendre_P1") export("legendre_P2") export("legendre_P3") export("legendre_Pl") export("legendre_Pl_array") export("legendre_Plm") export("legendre_Plm_array") export("legendre_Plm_deriv_array") export("legendre_Q0") export("legendre_Q1") export("legendre_Ql") export("legendre_sphPlm") export("legendre_sphPlm_array") export("legendre_sphPlm_deriv_array") export("lnbeta") export("lnchoose") export("lncosh") export("lndoublefact") export("lnfact") export("lngamma") export("lngamma_complex") export("lngamma_sgn") export("lnpoch") export("lnpoch_sgn") export("lnsinh") export("log_1plusx") export("log_1plusx_mx") export("log_abs") export("log_erfc") export("multimin") export("multimin.fminimizer.size") export("multimin.init") export("multimin.iterate") export("poch") export("pochrel") export("pow_int") export("process.args") export("psi") export("psi_1") export("psi_1_int") export("psi_1piy") export("psi_int") export("psi_n") export("qrng_alloc") export("qrng_clone") export("qrng_get") export("qrng_init") export("qrng_name") export("qrng_size") export("rng_alloc") export("rng_clone") export("rng_get") export("rng_max") export("rng_min") export("rng_name") export("rng_set") export("rng_uniform") export("rng_uniform_int") export("rng_uniform_pos") export("Shi") export("Si") export("sinc") export("sn_cn_dn") export("strictify") export("synchrotron_1") export("synchrotron_2") export("taylorcoeff") export("transport_2") export("transport_3") export("transport_4") export("transport_5") export("zeta") export("zeta_int") export("zetam1") export("zetam1_int") useDynLib(gsl, .registration = TRUE, .fixes= "C_") gsl/INSTALL0000644000176200001440000000133713443526307012103 0ustar liggesusersThe gsl R package is a wrapper for the GSL C library (note capitalization). Installing gsl from source requires you to download and install GSL first. Ensure that you can compile and run a simple test program such as the example program near the start of the gsl Reference Manual. Some linux users report that is is possoble to go to the Ubuntu Software Center and install "GNU Scientific Library (GSL) -- development package", which has the name "libgsl0-dev". If the gsl R package builds successfully but will not load, make sure to inform your system linker/loader where to find the GSL libraries used to compile it. That step may be missed when using a manual GSL installation as opposed to one performed by a package manager.gsl/R/0000755000176200001440000000000013443540013011235 5ustar liggesusersgsl/R/trig.R0000644000176200001440000002076613443526307012352 0ustar liggesusers"gsl_sf_sin" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("sin_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val attributes(val) <- attr err <- jj$err status <- jj$status attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gsl_sf_cos" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("cos_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val attributes(val) <- attr err <- jj$err status <- jj$status attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hypot" <- function(x, y, give=FALSE, strict=TRUE){ jj <- process.args(x,y) x.vec <- jj$arg1 y.vec <- jj$arg2 attr <- jj$attr jj <- .C("hypot_e", as.double(x.vec), as.double(y.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val attributes(val) <- attr err <- jj$err status <- jj$status attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "sinc" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("sinc_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val attributes(val) <- attr err <- jj$err status <- jj$status attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "complex_sin" <- function(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE){ attr <- attributes(zr) if(is.null(zi)){ zi <- as.vector(Im(zr)) zr <- as.vector(Re(zr)) } else { zi <- as.vector(zi) zr <- as.vector(zr) } if(length(zr) !=length(zi)){stop("zr and zi must be of the same dimensions")} jj <- .C("complex_sin_e", as.double(zr), as.double(zi), as.integer(length(zr)), val_lnr=as.double(zr), val_arg=as.double(zr), err_lnr=as.double(zr), err_arg=as.double(zr), status=as.integer(0*zr), PACKAGE="gsl" ) val_lnr <- jj$val_lnr val_arg <- jj$val_arg err_lnr <- jj$err_lnr err_arg <- jj$err_arg status <- jj$status attributes(status) <- attr if(r.and.i){ # val <- exp(val_lnr)*cos(val_arg) + 1i*exp(val_lnr)*sin(val_arg) # err <- exp(xerr_lnr)*cos(err_arg) + 1i*exp(err_lnr)*sin(err_arg) val <- val_lnr + 1i*val_arg err <- err_lnr + 1i*err_arg attributes(val) <- attr attributes(err) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, err=err, status=status)) } else { return(val) } } else { attributes(val_lnr) <- attr attributes(val_arg) <- attr attributes(err_lnr) <- attr attributes(err_arg) <- attr if(strict){ val_lnr <- strictify(val_lnr,status) val_arg <- strictify(val_arg,status) } if(give){ return(list(val_lnr=val_lnr, val_arg=val_arg, err_lnr=err_lnr,err_arg=err_arg, status=status)) } else { return(list(val_lnr=val_lnr, val_arg=val_arg)) } } } "complex_cos" <- function(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE){ attr <- attributes(zr) if(is.null(zi)){ zi <- as.vector(Im(zr)) zr <- as.vector(Re(zr)) } else { zi <- as.vector(zi) zr <- as.vector(zr) } if(length(zr) !=length(zi)){stop("zr and zi must be of the same dimensions")} jj <- .C("complex_cos_e", as.double(zr), as.double(zi), as.integer(length(zr)), val_lnr=as.double(zr), val_arg=as.double(zr), err_lnr=as.double(zr), err_arg=as.double(zr), status=as.integer(0*zr), PACKAGE="gsl" ) val_lnr <- jj$val_lnr val_arg <- jj$val_arg err_lnr <- jj$err_lnr err_arg <- jj$err_arg status <- jj$status attributes(status) <- attr if(r.and.i){ # val <- exp(val_lnr)*cos(val_arg) + 1i*exp(val_lnr)*sin(val_arg) # err <- exp(xerr_lnr)*cos(err_arg) + 1i*exp(err_lnr)*sin(err_arg) val <- val_lnr + 1i*val_arg err <- err_lnr + 1i*err_arg attributes(val) <- attr attributes(err) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, err=err, status=status)) } else { return(val) } } else { attributes(val_lnr) <- attr attributes(val_arg) <- attr attributes(err_lnr) <- attr attributes(err_arg) <- attr if(strict){ val_lnr <- strictify(val_lnr,status) val_arg <- strictify(val_arg,status) } if(give){ return(list(val_lnr=val_lnr, val_arg=val_arg, err_lnr=err_lnr,err_arg=err_arg, status=status)) } else { return(list(val_lnr=val_lnr, val_arg=val_arg)) } } } "complex_logsin" <- function(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE){ attr <- attributes(zr) if(is.null(zi)){ zi <- as.vector(Im(zr)) zr <- as.vector(Re(zr)) } else { zi <- as.vector(zi) zr <- as.vector(zr) } if(length(zr) !=length(zi)){stop("zr and zi must be of the same dimensions")} jj <- .C("complex_logsin_e", as.double(zr), as.double(zi), as.integer(length(zr)), val_lnr=as.double(zr), val_arg=as.double(zr), err_lnr=as.double(zr), err_arg=as.double(zr), status=as.integer(0*zr), PACKAGE="gsl" ) val_lnr <- jj$val_lnr val_arg <- jj$val_arg err_lnr <- jj$err_lnr err_arg <- jj$err_arg status <- jj$status attributes(status) <- attr if(r.and.i){ val <- val_lnr + 1i*val_arg err <- err_lnr + 1i*err_arg attributes(val) <- attr attributes(err) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, err=err, status=status)) } else { return(val) } } else { attributes(val_lnr) <- attr attributes(val_arg) <- attr attributes(err_lnr) <- attr attributes(err_arg) <- attr if(strict){ val_lnr <- strictify(val_lnr,status) val_arg <- strictify(val_arg,status) } if(give){ return(list(val_lnr=val_lnr, val_arg=val_arg, err_lnr=err_lnr,err_arg=err_arg, status=status)) } else { return(list(val_lnr=val_lnr, val_arg=val_arg)) } } } "lnsinh" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("lnsinh_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val attributes(val) <- attr err <- jj$err status <- jj$status attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lncosh" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("lncosh_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val attributes(val) <- attr err <- jj$err status <- jj$status attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/poly.R0000644000176200001440000000056213443526307012360 0ustar liggesusers"gsl_poly" <- function(c_gsl, x){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("gsl_poly", as.double(c_gsl), as.integer(length(c_gsl)), as.double(x.vec), as.integer(length(x.vec)), ans=as.double(x.vec), PACKAGE="gsl" ) ans <- jj$ans attributes(ans) <- attr return(ans) } gsl/R/pow_int.R0000644000176200001440000000126513443526307013055 0ustar liggesusers"pow_int" <- function(x, n, give=FALSE, strict=TRUE){ jj <- process.args(x,n) x.vec <- jj$arg1 n.vec <- jj$arg2 attr <- jj$attr jj <- .C("pow_int", as.double(x.vec), as.integer(n.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/coulomb.R0000644000176200001440000002376613443526307013050 0ustar liggesusers"hydrogenicR_1" <- function(Z, r, give=FALSE, strict=TRUE){ jj <- process.args(Z,r) Z.vec <- jj$arg1 r.vec <- jj$arg2 attr <- jj$attr jj <- .C("hydrogenicR_1", as.double(Z.vec), as.double(r.vec), as.integer(length(Z.vec)), val=as.double(Z.vec), err=as.double(Z.vec), status=as.integer(0*Z.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hydrogenicR" <- function(n, l, Z, r, give=FALSE, strict=TRUE){ jj <- process.args(n,l,Z,r) n.vec <- jj$arg1 l.vec <- jj$arg2 Z.vec <- jj$arg3 r.vec <- jj$arg4 attr <- jj$attr jj <- .C("hydrogenicR", as.integer(n.vec), as.integer(l.vec), as.double(Z.vec), as.double(r.vec), as.integer(length(r.vec)), val=as.double(r.vec), err=as.double(r.vec), status=as.integer(0*r.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "coulomb_wave_FG" <- function(eta, x, L_F, k, give=FALSE, strict=TRUE){ jj <- process.args(eta, x, L_F, k) eta.vec <- jj$arg1 x.vec <- jj$arg2 L_F.vec <- jj$arg3 k.vec <- jj$arg4 attr <- jj$attr jj <- .C("coulomb_wave_FG", as.double(eta.vec), as.double(x.vec), as.double(L_F.vec), as.integer(k.vec), as.integer(length(eta.vec)), val_F=as.double(0*eta.vec), err_F=as.double(0*eta.vec), val_Fp=as.double(0*eta.vec), err_Fp=as.double(0*eta.vec), val_G=as.double(0*eta.vec), err_G=as.double(0*eta.vec), val_Gp=as.double(0*eta.vec), err_Gp=as.double(0*eta.vec), exp_F=as.double(0*eta.vec), exp_G=as.double(0*eta.vec), status=as.integer(0*eta.vec), PACKAGE="gsl" ) val_F <- jj$val_F val_Fp <- jj$val_Fp val_G <- jj$val_G val_Gp <- jj$val_Gp err_F <- jj$err_F err_Fp <- jj$err_Fp err_G <- jj$err_Gp err_Gp <- jj$err_Gp status <- jj$status exp_F <- jj$exp_F exp_G <- jj$exp_G attributes(val_F) <- attr attributes(val_Fp) <- attr attributes(val_G) <- attr attributes(val_Gp) <- attr attributes(err_F) <- attr attributes(err_Fp) <- attr attributes(err_G) <- attr attributes(err_Gp) <- attr attributes(exp_F) <- attr attributes(exp_G) <- attr attributes(status) <- attr if(strict){ val_F <- strictify(val_F,status) val_Fp <- strictify(val_Fp,status) val_G <- strictify(val_G,status) val_Gp <- strictify(val_Gp,status) err_F <- strictify(err_F,status) err_Fp <- strictify(err_Fp,status) err_G <- strictify(err_G,status) err_Gp <- strictify(err_Gp,status) exp_F <- strictify(exp_F,status) exp_G <- strictify(exp_G,status) } if(give){ return(list(val_F=val_F, val_Fp=val_Fp, val_G=val_G, val_Gp=val_Gp, err_F=err_F, err_Fp=err_Fp, err_G=err_G, err_Gp=err_Gp, exp_F=exp_F, exp_G=exp_G, status=status ) ) } else { return(list(val_F=val_F, val_Fp=val_Fp, val_G=val_G, val_Gp=val_Gp, exp_F=exp_F, exp_G=exp_G ) ) } } "coulomb_wave_F_array" <- function(L_min, kmax, eta, x, give=FALSE,strict=TRUE){ if(length(L_min)>1){stop("L_min should be of length 1")} if(length(kmax)>1){stop("kmax should be of length 1")} jj <- process.args(eta,x) eta.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr x.out <- rep(x.vec,(kmax+1)) jj <- .C("coulomb_wave_F_array", as.double(L_min), as.integer(kmax), as.double(eta.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), F_exp=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(kmax+1, length(x.vec)) rownames(val) <- L_min:(L_min+kmax) colnames(val) <- names(x) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, F_exp=jj$F_exp, status=status)) } else { return(val) } } "coulomb_wave_FG_array" <- function(L_min, kmax, eta, x, give=FALSE,strict=TRUE){ if(length(L_min)>1){stop("L_min should be of length 1")} if(length(kmax)>1){stop("kmax should be of length 1")} jj <- process.args(eta,x) eta.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr x.out <- rep(x.vec,(kmax+1)) jj <- .C("coulomb_wave_FG_array", as.double(L_min), as.integer(kmax), as.double(eta.vec), as.double(x.vec), as.integer(length(x.vec)), val_F=as.double(x.out), val_G=as.double(x.out), F_exp=as.double(x.vec), G_exp=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val_F <- jj$val_F val_G <- jj$val_G F_exp <- jj$F_exp G_exp <- jj$G_exp dim(val_F) <- c(kmax+1, length(x.vec)) dim(val_G) <- c(kmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val_F <- strictify(val_F,status) val_G <- strictify(val_G,status) } if(give){ return(list(val_F=val_F, val_G=val_G, F_exp=F_exp, status=status)) } else { return(list(val_F=val_F, val_G=val_G)) } } "coulomb_wave_FGp_array" <- function(L_min, kmax, eta, x, give=FALSE,strict=TRUE){ if(length(L_min)>1){stop("L_min should be of length 1")} if(length(kmax)>1){stop("kmax should be of length 1")} jj <- process.args(eta,x) eta.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr x.out <- rep(x.vec,(kmax+1)) jj <- .C("coulomb_wave_FGp_array", as.double(L_min), as.integer(kmax), as.double(eta.vec), as.double(x.vec), as.integer(length(x.vec)), val_F=as.double(x.out), val_Fp=as.double(x.out), val_G=as.double(x.out), val_Gp=as.double(x.out), F_exp=as.double(x.vec), G_exp=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val_F <- jj$val_F val_Fp <- jj$val_Fp val_G <- jj$val_G val_Gp <- jj$val_Gp F_exp <- jj$F_exp G_exp <- jj$G_exp dim(val_F) <- c(kmax+1, length(x.vec)) dim(val_Fp) <- c(kmax+1, length(x.vec)) dim(val_G) <- c(kmax+1, length(x.vec)) dim(val_Gp) <- c(kmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val_F <- strictify(val_F,status) val_Fp <- strictify(val_Fp,status) val_G <- strictify(val_G,status) val_Gp <- strictify(val_Gp,status) } if(give){ return(list(val_F=val_F, val_Fp=val_Fp, val_G=val_G, val_Gp=val_Gp, F_exp=F_exp, status=status)) } else { return(list(val_F=val_F, val_Fp=val_Fp, val_G=val_G, val_Gp=val_Gp)) } } "coulomb_wave_sphF_array" <- function(L_min, kmax, eta, x, give=FALSE,strict=TRUE){ if(length(L_min)>1){stop("L_min should be of length 1")} if(length(kmax)>1){stop("kmax should be of length 1")} jj <- process.args(eta,x) eta.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr x.out <- rep(x.vec,(kmax+1)) jj <- .C("coulomb_wave_sphF_array", as.double(L_min), as.integer(kmax), as.double(eta.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), F_exp=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(kmax+1, length(x.vec)) rownames(val) <- L_min:(L_min+kmax) colnames(val) <- names(x) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, F_exp=jj$F_exp, status=status)) } else { return(val) } } "coulomb_CL" <- function(L, eta, give=FALSE, strict=TRUE){ jj <- process.args(L,eta) L.vec <- jj$arg1 eta.vec <- jj$arg2 attr <- jj$attr jj <- .C("coulomb_CL", as.double(L.vec), as.double(eta.vec), as.integer(length(L.vec)), val=as.double(L.vec), err=as.double(L.vec), status=as.integer(0*L.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "coulomb_CL_array" <- function(L_min, kmax, eta, give=FALSE,strict=TRUE){ if(length(L_min)>1){stop("L_min should be of length 1")} if(length(kmax)>1){stop("kmax should be of length 1")} jj <- process.args(eta) eta.vec <- jj$arg1 attr <- jj$attr eta.out <- rep(eta.vec,(kmax+1)) jj <- .C("coulomb_CL_array", as.double(L_min), as.integer(kmax), as.double(eta.vec), as.integer(length(eta.vec)), val=as.double(eta.out), status=as.integer(0*eta.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(kmax+1, length(eta.vec)) rownames(val) <- L_min:(L_min+kmax) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, status=status)) } else { return(val) } } gsl/R/aaa.R0000644000176200001440000000335213443526307012117 0ustar liggesusers"process.args" <- function(...){ a <- list(...) attr <- attributes(a[[which.max(unlist(lapply(a,length)))]]) a <- lapply(a,as.vector) out <- do.call("rbind",a) out <- split(out,row(out)) names(out) <- paste("arg",1:length(a),sep="") return(c(out,attr=list(attr))) } #"process.2.args" <- function(a1,a2){ # lens <- c(length(a1),length(a2)) # attributes.list <- list(attributes(a1),attributes(a2)) # attributes.wanted <- attributes.list[[which.max(lens)]] # # jj <- rbind(as.vector(a1),as.vector(a2)) # return(list(arg1=as.vector(jj[1,]), # arg2=as.vector(jj[2,]), # attr=attributes.wanted # ) # ) #} # #process.3.args <- function(a1,a2,a3){ # lens <- c(length(a1),length(a2),length(a3)) # attributes.list <- list(attributes(a1),attributes(a2),attributes(a3)) # attributes.wanted <- attributes.list[[which.max(lens)]] # # jj <- rbind(as.vector(a1),as.vector(a2),as.vector(a3)) # return(list(arg1=as.vector(jj[1,]), # arg2=as.vector(jj[2,]), # arg3=as.vector(jj[3,]), # attr=attributes.wanted # ) # ) #} #process.4.args <- function(a1,a2,a3,a4){ # lens <- c(length(a1),length(a2),length(a3),length(a4)) # attributes.list <- list(attributes(a1),attributes(a2),attributes(a3),attributes(a4)) # attributes.wanted <- attributes.list[[which.max(lens)]] # # jj <- rbind(as.vector(a1),as.vector(a2),as.vector(a3),as.vector(a4)) # return(list(arg1=as.vector(jj[1,]), # arg2=as.vector(jj[2,]), # arg3=as.vector(jj[3,]), # arg4=as.vector(jj[4,]), # attr=attributes.wanted # ) # ) #} # # strictify <- function(val,status) { val[status>0] <- NaN return(val) } gsl/R/rng.R0000644000176200001440000000264213443526307012164 0ustar liggesusers"rng_alloc" <- function(type = c("mt19937", "ranlxs0", "ranlxs1", "ranlxs2", "ranlxd1", "ranlxd2", "ranlux", "ranlux389", "cmrg", "mrg", "taus", "taus2", "gfsr4", "minstd")) { type <- switch( match.arg(type), mt19937 = 0, ranlxs0 = 1, ranlxs1 = 2, ranlxs2 = 3, ranlxd1 = 4, ranlxd2 = 5, ranlux = 6, ranlux389 = 7, cmrg = 8, mrg = 9, taus = 10, taus2 = 11, gfsr4 = 12, minstd = 13 ) retval <- .Call("rng_alloc", type, PACKAGE = "gsl") class(retval) <- c("gsl_rng", class(retval)) retval } "rng_set" <- function(r, seed) { .Call("rng_set", r, seed, PACKAGE = "gsl") } "rng_clone" <- function(r) { retval <- .Call("rng_clone", r, PACKAGE = "gsl") class(retval) <- "gsl_rng" retval } "rng_name" <- function(r) { .Call("rng_name", r, PACKAGE = "gsl") } "rng_min" <- function(r) { .Call("rng_min", r, PACKAGE = "gsl") } "rng_max" <- function(r) { .Call("rng_max", r, PACKAGE = "gsl") } "rng_get" <- function(r, length) { .Call("rng_get", r, length, PACKAGE = "gsl") } "rng_uniform" <- function(r, length) { .Call("rng_uniform", r, length, PACKAGE = "gsl") } "rng_uniform_pos" <- function(r, length) { .Call("rng_uniform_pos", r, length, PACKAGE = "gsl") } "rng_uniform_int" <- function(r, N, length) { if( ! (N > 0) ) stop("N needs to be positive") .Call("rng_uniform_int", r, N, length, PACKAGE = "gsl") } gsl/R/elljac.R0000644000176200001440000000417113443526307012627 0ustar liggesusers"elljac" <- function(u, m, give=FALSE, strict=TRUE){ jj <- process.args(u, m) u.vec <- jj$arg1 m.vec <- jj$arg2 attr <- jj$attr jj <- .C("elljac_e", as.double(u.vec), as.double(m.vec), as.integer(length(u.vec)), sn=as.double(u.vec), cn=as.double(u.vec), dn=as.double(u.vec), status=as.integer(0*u.vec), PACKAGE="gsl" ) sn <- jj$sn cn <- jj$cn dn <- jj$dn attributes(sn) <- attr attributes(cn) <- attr attributes(dn) <- attr status <- jj$status attributes(status) <- attr if(strict){ sn <- strictify(sn,status) cn <- strictify(cn,status) dn <- strictify(dn,status) } if(give){ return(list(list(sn=sn,cn=cn,dn=dn),status=status)) } else { return(list(sn=sn,cn=cn,dn=dn)) } } "sn_cn_dn" <- function(z,m,thing){ # complex case jj.r <- elljac(Re(z),m) s <- jj.r$sn c <- jj.r$cn d <- jj.r$dn if(is.complex(z)){ jj.i <- elljac(Im(z),1-m) s1 <- jj.i$sn c1 <- jj.i$cn d1 <- jj.i$dn out <- switch(thing, sn = (s*d1 +1i*c*d*s1*c1)/(c1^2+m*s^2*s1^2), cn = (c*c1 -1i*s*d*s1*d1)/(c1^2+m*s^2*s1^2), dn = (d*c1*d1-1i*m*s*c*s1 )/(c1^2+m*s^2*s1^2), stop('argument "thing" should be one of sn, cn, dn') ) } else { out <- switch(thing, sn = s, cn = c, dn = d, stop('argument "thing" should be one of sn, cn, dn') ) } return(out) } gsl_sn <- function(z,m){sn_cn_dn(z,m,thing="sn")} gsl_cn <- function(z,m){sn_cn_dn(z,m,thing="cn")} gsl_dn <- function(z,m){sn_cn_dn(z,m,thing="dn")} gsl_ns <- function(z,m){1/gsl_sn(z,m)} gsl_nc <- function(z,m){1/gsl_cn(z,m)} gsl_nd <- function(z,m){1/gsl_dn(z,m)} gsl_sc <- function(z,m){gsl_sn(z,m)/gsl_cn(z,m)} gsl_sd <- function(z,m){gsl_sn(z,m)/gsl_dn(z,m)} gsl_cs <- function(z,m){gsl_cn(z,m)/gsl_sn(z,m)} gsl_cd <- function(z,m){gsl_cn(z,m)/gsl_dn(z,m)} gsl_ds <- function(z,m){gsl_dn(z,m)/gsl_sn(z,m)} gsl_dc <- function(z,m){gsl_dn(z,m)/gsl_cn(z,m)} gsl/R/hyperg.R0000644000176200001440000001705713443526307012702 0ustar liggesusers"hyperg_0F1" <- function(c, x, give=FALSE, strict=TRUE){ jj <- process.args(c,x) c.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("hyperg_0F1_e", as.double(c.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_1F1_int" <- function(m, n, x, give=FALSE, strict=TRUE){ jj <- process.args(m,n,x) m.vec <- jj$arg1 n.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("hyperg_1F1_int_e", as.integer(m.vec), as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_1F1" <- function(a, b, x, give=FALSE, strict=TRUE){ jj <- process.args(a,b,x) a.vec <- jj$arg1 b.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("hyperg_1F1_e", as.double(a.vec), as.double(b.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_U_int" <- function(m, n, x, give=FALSE, strict=TRUE){ jj <- process.args(m,n,x) m.vec <- jj$arg1 n.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("hyperg_U_int_e", as.integer(m.vec), as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_U" <- function(a, b, x, give=FALSE, strict=TRUE){ jj <- process.args(a,b,x) a.vec <- jj$arg1 b.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("hyperg_U_e", as.double(a.vec), as.double(b.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_2F1" <- function(a, b, c, x, give=FALSE, strict=TRUE){ jj <- process.args(a, b, c, x) a.vec <- jj$arg1 b.vec <- jj$arg2 c.vec <- jj$arg3 x.vec <- jj$arg4 attr <- jj$attr jj <- .C("hyperg_2F1_e", as.double(a.vec), as.double(b.vec), as.double(c.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_2F1_conj" <- function(aR, aI, c, x, give=FALSE, strict=TRUE){ jj <- process.args(aR,aI,c,x) aR.vec <- jj$arg1 aI.vec <- jj$arg2 c.vec <- jj$arg3 x.vec <- jj$arg4 attr <- jj$attr jj <- .C("hyperg_2F1_conj_e", as.double(aR.vec), as.double(aI.vec), as.double(c.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_2F1_renorm" <- function(a, b, c, x, give=FALSE, strict=TRUE){ jj <- process.args(a,b,c,x) a.vec <- jj$arg1 b.vec <- jj$arg2 c.vec <- jj$arg3 x.vec <- jj$arg4 attr <- jj$attr jj <- .C("hyperg_2F1_renorm_e", as.double(a.vec), as.double(b.vec), as.double(c.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_2F1_conj_renorm" <- function(aR, aI, c, x, give=FALSE, strict=TRUE){ jj <- process.args(aR,aI,c,x) aR.vec <- jj$arg1 aI.vec <- jj$arg2 c.vec <- jj$arg3 x.vec <- jj$arg4 attr <- jj$attr jj <- .C("hyperg_2F1_conj_renorm_e", as.double(aR.vec), as.double(aI.vec), as.double(c.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_2F0" <- function(a, b, x, give=FALSE, strict=TRUE){ jj <- process.args(a,b,x) a.vec <- jj$arg1 b.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("hyperg_2F0_e", as.double(a.vec), as.double(b.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/lambert.R0000644000176200001440000000233313443526307013021 0ustar liggesusers"lambert_W0" <- function(x,give=FALSE,strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("lambert_W0", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lambert_Wm1" <- function(x,give=FALSE,strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("lambert_Wm1", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/laguerre.R0000644000176200001440000000540613443526307013205 0ustar liggesusers"laguerre_1" <- function(a, x, give=FALSE, strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("laguerre_1", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "laguerre_2" <- function(a, x, give=FALSE, strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("laguerre_2", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "laguerre_3" <- function(a, x, give=FALSE, strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("laguerre_3", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "laguerre_n" <- function(n, a, x, give=FALSE, strict=TRUE){ jj <- process.args(n,a,x) n.vec <- jj$arg1 a.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("laguerre_n", as.integer(n.vec), as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/psi.R0000644000176200001440000000726413443526307012176 0ustar liggesusers"psi_int" <- function(n, give=FALSE, strict=TRUE){ attr <- attributes(n) n.vec <- as.vector(n) jj <- .C("psi_int", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "psi" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("psi", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "psi_1piy" <- function(y, give=FALSE, strict=TRUE){ attr <- attributes(y) y.vec <- as.vector(y) jj <- .C("psi_1piy", as.double(y.vec), as.integer(length(y.vec)), val=as.double(y.vec), err=as.double(y.vec), status=as.integer(0*y.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "psi_1_int" <- function(n, give=FALSE, strict=TRUE){ attr <- attributes(n) n.vec <- as.vector(n) jj <- .C("psi_1_int", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "psi_1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("psi_1", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "psi_n" <- function(m, x, give=FALSE, strict=TRUE){ jj <- process.args(m,x) m.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("psi_n", as.integer(m.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/debye.R0000644000176200001440000000466013443526307012470 0ustar liggesusers"debye_1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("debye_1", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "debye_2" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("debye_2", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "debye_3" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("debye_3", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "debye_4" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("debye_4", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/airy.R0000644000176200001440000001751313443526307012345 0ustar liggesusers"airy_Ai" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Ai_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Bi" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Bi_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Ai_scaled" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Ai_scaled_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Bi_scaled" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Bi_scaled_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Ai_deriv" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Ai_deriv_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Bi_deriv" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Bi_deriv_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Ai_deriv_scaled" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Ai_deriv_scaled_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Bi_deriv_scaled" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Bi_deriv_scaled_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_zero_Ai" <- function(n, give=FALSE, strict=TRUE){ n.vec <- as.vector(pmax(n,1)) attr <- attributes(n) jj <- .C("airy_zero_Ai_e", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } val[n<1] <- NA if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_zero_Bi" <- function(n, give=FALSE, strict=TRUE){ n.vec <- as.vector(pmax(n,1)) attr <- attributes(n) jj <- .C("airy_zero_Bi_e", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } val[n<1] <- NA if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_zero_Ai_deriv" <- function(n, give=FALSE, strict=TRUE){ n.vec <- as.vector(pmax(n,1)) attr <- attributes(n) jj <- .C("airy_zero_Ai_deriv_e", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } val[n<1] <- NA if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_zero_Bi_deriv" <- function(n, give=FALSE, strict=TRUE){ n.vec <- as.vector(pmax(n,1)) attr <- attributes(n) jj <- .C("airy_zero_Bi_deriv_e", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } val[n<1] <- NA if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/zeta.R0000644000176200001440000001046713443526307012345 0ustar liggesusers"zeta_int" <- function(n, give=FALSE, strict=TRUE){ attr <- attributes(n) n.vec <- as.vector(n) jj <- .C("zeta_int", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "zeta" <- function(s, give=FALSE, strict=TRUE){ attr <- attributes(s) s.vec <- as.vector(s) jj <- .C("zeta", as.double(s.vec), as.integer(length(s.vec)), val=as.double(s.vec), err=as.double(s.vec), status=as.integer(0*s.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "zetam1_int" <- function(n, give=FALSE, strict=TRUE){ attr <- attributes(n) n.vec <- as.vector(n) jj <- .C("zetam1_int", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "zetam1" <- function(s, give=FALSE, strict=TRUE){ attr <- attributes(s) s.vec <- as.vector(s) jj <- .C("zetam1", as.double(s.vec), as.integer(length(s.vec)), val=as.double(s.vec), err=as.double(s.vec), status=as.integer(0*s.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hzeta" <- function(s, q, give=FALSE, strict=TRUE){ jj <- process.args(s,q) s.vec <- jj$arg1 q.vec <- jj$arg2 attr <- jj$attr jj <- .C("hzeta", as.double(s.vec), as.double(q.vec), as.integer(length(s.vec)), val=as.double(s.vec), err=as.double(s.vec), status=as.integer(0*s.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "eta_int" <- function(n, give=FALSE, strict=TRUE){ attr <- attributes(n) n.vec <- as.vector(n) jj <- .C("eta_int", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "eta" <- function(s, give=FALSE, strict=TRUE){ attr <- attributes(s) s.vec <- as.vector(s) jj <- .C("eta", as.double(s.vec), as.integer(length(s.vec)), val=as.double(s.vec), err=as.double(s.vec), status=as.integer(0*s.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/log.R0000644000176200001440000001013713443526307012155 0ustar liggesusers"gsl_sf_log" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("log_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "log_abs" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("log_abs_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "complex_log" <- function(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE){ attr <- attributes(zr) if(is.null(zi)){ zi <- as.vector(Im(zr)) zr <- as.vector(Re(zr)) } else { zi <- as.vector(zi) zr <- as.vector(zr) } if(length(zr) !=length(zi)){stop("zr and zi must be of the same dimensions")} jj <- .C("complex_log_e", as.double(zr), as.double(zi), as.integer(length(zr)), val_lnr=as.double(zr), val_arg=as.double(zr), err_lnr=as.double(zr), err_arg=as.double(zr), status=as.integer(0*zr), PACKAGE="gsl" ) val_lnr <- jj$val_lnr val_arg <- jj$val_arg err_lnr <- jj$err_lnr err_arg <- jj$err_arg status <- jj$status attributes(status) <- attr if(r.and.i){ # val <- exp(val_lnr)*cos(val_arg) + 1i*exp(val_lnr)*sin(val_arg) # err <- exp(xerr_lnr)*cos(err_arg) + 1i*exp(err_lnr)*sin(err_arg) val <- val_lnr + 1i*val_arg err <- err_lnr + 1i*err_arg attributes(val) <- attr attributes(err) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, err=err, status=status)) } else { return(val) } } else { attributes(val_lnr) <- attr attributes(val_arg) <- attr attributes(err_lnr) <- attr attributes(err_arg) <- attr if(strict){ val_lnr <- strictify(val_lnr,status) val_arg <- strictify(val_arg,status) } if(give){ return(list(val_lnr=val_lnr, val_arg=val_arg, err_lnr=err_lnr,err_arg=err_arg, status=status)) } else { return(list(val_lnr=val_lnr, val_arg=val_arg)) } } } "log_1plusx" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("log_1plusx_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "log_1plusx_mx" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("log_1plusx_mx_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/expint.R0000644000176200001440000001414613443526307012707 0ustar liggesusers"expint_E1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("expint_E1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "expint_E2" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("expint_E2_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "expint_En" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n, x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("expint_En_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "expint_Ei" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("expint_Ei_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "Shi" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("Shi_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "Chi" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("Chi_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "expint_3" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("expint_3_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "Si" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("Si_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "Ci" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("Ci_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "atanint" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("atanint_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/fermi_dirac.R0000644000176200001440000001337513443526307013647 0ustar liggesusers"fermi_dirac_m1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_m1", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_0" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_0", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_1", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_2" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_2", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_int" <- function(j, x, give=FALSE, strict=TRUE){ jj <- process.args(j, x) j.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("fermi_dirac_int", as.integer(j.vec), as.double(x.vec), as.integer(length(j.vec)), val=as.double(j.vec), err=as.double(j.vec), status=as.integer(0*j.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_mhalf" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_mhalf", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_half" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_half", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_3half" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_3half", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_inc_0" <- function(x, b, give=FALSE, strict=TRUE){ jj <- process.args(x,b) x.vec <- jj$arg1 b.vec <- jj$arg2 attr <- jj$attr jj <- .C("fermi_dirac_inc_0", as.double(x.vec), as.double(b.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/bessel.R0000644000176200001440000011307313443526307012654 0ustar liggesusers"bessel_J0" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_J0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_J1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_J1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Jn" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n, x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Jn_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Jn_array" <- function(nmin,nmax, x, give=FALSE,strict=TRUE){ if(length(nmin)>1){stop("nmin should be of length 1")} if(length(nmax)>1){stop("nmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(nmax-nmin+1)) jj <- .C("bessel_Jn_array_e", as.integer(nmin), as.integer(nmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax-nmin+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_Y0" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_Y0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Y1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_Y1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Yn" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n,x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Yn_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Yn_array" <- function(nmin,nmax, x, give=FALSE,strict=TRUE){ if(length(nmin)>1){stop("nmin should be of length 1")} if(length(nmax)>1){stop("nmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(nmax-nmin+1)) jj <- .C("bessel_Yn_array_e", as.integer(nmin), as.integer(nmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax-nmin+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_I0" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_I0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_I1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_I1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_In" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n, x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_In_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_In_array" <- function(nmin,nmax, x, give=FALSE,strict=TRUE){ if(length(nmin)>1){stop("nmin should be of length 1")} if(length(nmax)>1){stop("nmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(nmax-nmin+1)) jj <- .C("bessel_In_array_e", as.integer(nmin), as.integer(nmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax-nmin+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_I0_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_I0_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_I1_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_I1_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_In_scaled" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n,x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_In_scaled_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_In_scaled_array" <- function(nmin,nmax, x, give=FALSE,strict=TRUE){ if(length(nmin)>1){stop("nmin should be of length 1")} if(length(nmax)>1){stop("nmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(nmax-nmin+1)) jj <- .C("bessel_In_scaled_array_e", as.integer(nmin), as.integer(nmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax-nmin+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_K0" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_K0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_K1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_K1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Kn" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n, x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Kn_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Kn_array" <- function(nmin,nmax, x, give=FALSE,strict=TRUE){ if(length(nmin)>1){stop("nmin should be of length 1")} if(length(nmax)>1){stop("nmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(nmax-nmin+1)) jj <- .C("bessel_Kn_array_e", as.integer(nmin), as.integer(nmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax-nmin+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_K0_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_K0_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_K1_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_K1_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Kn_scaled" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n, x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Kn_scaled_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Kn_scaled_array" <- function(nmin,nmax, x, give=FALSE,strict=TRUE){ if(length(nmin)>1){stop("nmin should be of length 1")} if(length(nmax)>1){stop("nmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) nmin <- as.integer(nmin) nmax <- as.integer(nmax) x.out <- rep(x.vec,(nmax-nmin+1)) jj <- .C("bessel_Kn_scaled_array_e", as.integer(nmin), as.integer(nmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax-nmin+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_j0" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_j0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_j1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_j1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_j2" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_j2_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_jl" <- function(l, x, give=FALSE, strict=TRUE){ jj <- process.args(l, x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_jl_e", as.integer(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_jl_array" <- function(lmax, x, give=FALSE,strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(lmax+1)) jj <- .C("bessel_jl_array_e", as.integer(lmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_jl_steed_array" <- function(lmax, x, give=FALSE,strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(lmax+1)) jj <- .C("bessel_jl_steed_array_e", as.integer(lmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_y0" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_y0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_y1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_y1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_y2" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_y2_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_yl" <- function(l, x, give=FALSE, strict=TRUE){ jj <- process.args(l, x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$arg3 jj <- .C("bessel_yl_e", as.integer(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_yl_array" <- function(lmax, x, give=FALSE, strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(lmax+1)) jj <- .C("bessel_yl_array_e", as.integer(lmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_i0_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_i0_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_i1_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_i1_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_i2_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_i2_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_il_scaled" <- function(l, x, give=FALSE, strict=TRUE){ jj <- process.args(l, x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_il_scaled_e", as.integer(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_il_scaled_array" <- function(lmax, x, give=FALSE,strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(lmax+1)) jj <- .C("bessel_il_scaled_array_e", as.integer(lmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_k0_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_k0_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_k1_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_k1_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_k2_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_k2_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_kl_scaled" <- function(l, x, give=FALSE, strict=TRUE){ jj <- process.args(l, x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_kl_scaled_e", as.integer(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_kl_scaled_array" <- function(lmax, x, give=FALSE,strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec, (lmax+1)) jj <- .C("bessel_kl_scaled_array_e", as.integer(lmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_Jnu" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Jnu_e", as.double(nu.vec), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_sequence_Jnu" <- function (nu, v, mode = 0, give = FALSE, strict=TRUE){ if (length(nu) > 1 ) { stop("nu should be of length 1") } if (length(mode) > 1 ) { stop("mode should be of length 1") } v.vec <- as.vector(v) if(any(v.vec<0)){stop("all elements of v must be positive")} if( !all(diff(v.vec)>0) ){stop("elements of v must be sorted in increasing order")} jj <- .C("bessel_sequence_Jnu_e", as.double(nu), val=as.double(v.vec), as.integer(length(v.vec)), as.integer(mode), status=as.integer(nu), PACKAGE = "gsl" ) val <- jj$val status <- jj$status attributes(val) <- attributes(v) attributes(status) <- attributes(v) if(strict){ if(status>0){val[] <- NA} } if(give){ return(list(val=val, status=status)) } else { return(val) } } "bessel_Ynu" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Ynu_e", as.double(nu), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_Inu" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Inu_e", as.double(nu.vec), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_Inu_scaled" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Inu_scaled_e", as.double(nu.vec), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_Knu" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Knu_e", as.double(nu.vec), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_lnKnu" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_lnKnu_e", as.double(nu.vec), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_Knu_scaled" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Knu_scaled_e", as.double(nu.vec), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_zero_J0" <- function (s, give = FALSE, strict = TRUE){ s.vec <- as.vector(s) attr <- attributes(s) jj <- .C("bessel_zero_J0_e", as.integer(s.vec), as.integer(length(s.vec)), val = as.double(s.vec), err = as.double(s.vec), status = as.integer(s.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_zero_J1" <- function (s, give = FALSE, strict = TRUE){ s.vec <- as.vector(s) attr <- attributes(s) jj <- .C("bessel_zero_J1_e", as.integer(s.vec), as.integer(length(s.vec)), val = as.double(s.vec), err = as.double(s.vec), status = as.integer(s.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_zero_Jnu" <- function (nu, s, give = FALSE, strict = TRUE){ jj <- process.args(nu,s) nu.vec <- jj$arg1 s.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_zero_Jnu_e", as.double(nu.vec), as.integer(s.vec), as.integer(length(s.vec)), val = as.double(s.vec), err = as.double(s.vec), status = as.integer(s.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } gsl/R/error.R0000644000176200001440000000752013443534642012530 0ustar liggesusers"erf" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("erf_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "erfc" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("erfc_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "log_erfc" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("log_erfc_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "erf_Z" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("erf_Z_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "erf_Q" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("erf_Q_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hazard" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("hazard_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/multimin.R0000644000176200001440000001142413443537023013227 0ustar liggesusers# An R wrapper for GSL's multimin family of functions for minimizing functions. # # Written in 2007 by Andrew Clausen # - Added Nelder-Mead convergence interface in 2010. #dyn.load("gsl.so") # These functions have been temporarily removed pending a permanent fix multimin <- function(..., prec=0.0001) {stop("These functions have been temporarily removed pending a permanent fix") # is.converged <- function(state, old.x) # { # if (state$method == "nm") # return(multimin.fminimizer.size(state) < prec) # # convergence <- ifelse(state$is.fdf, state$df, old.x - state$x) # return (sum(abs(convergence)) < prec) # } # # state <- multimin.init(...) # old.x <- state$x # while (TRUE) # { # state <- multimin.iterate(state) # if (is.converged(state, old.x)) # break # old.x <- state$x # } # state } multimin.init <- function(x, f, df=NA, fdf=NA, method=NA, step.size=NA, tol=NA) {stop("These functions have been temporarily removed pending a permanent fix") # multimin.method.names <- # list( # "conjugate-fr", # fletcher-reeves # "conjugate-pr", # polak-ribiere # "bfgs", # broyden-fletcher-goldfarb-shanno # "steepest-descent", # "nm" # nelder-mead # ) # # multimin.method.f <- c(FALSE, FALSE, FALSE, FALSE, TRUE) # multimin.method.fdf <- c(TRUE, TRUE, TRUE, TRUE, FALSE) # # stopifnot(length(formals(f)) == 1) # stopifnot(is.numeric(x)) # # n <- length(x) # # is.fdf = !missing(df) # if (is.fdf) { # stopifnot(length(formals(df)) == 1) # if (is.na(fdf)) # fdf <- function(x) list(f=f(x), df=df(x)) # stopifnot(length(formals(fdf)) == 1) # fdf_ <- function(x) { # result <- new.env() # vals <- fdf(x) # result$f <- vals$f # result$df <- vals$df # result # } # # if (missing(method)) # method <- "bfgs" # if (missing(step.size)) # step.size <- 1 # if (missing(tol)) # tol <- 1 # stopifnot(is.numeric(tol)) # } else { # if (missing(step.size)) # step.size <- rep(1, n) # if (missing(method)) # method <- "nm" # } # # stopifnot(is.numeric(step.size)) # # if (is.character(method)) { # method.name <- method # method <- match(method, multimin.method.names) # if (is.na(method)) # stop(paste(c( # "The optimization method '", method.name, # "' is not an option. Try one of these:\n", # paste(multimin.method.names, collapse=", "), # ".", # sep=""))) # } # method <- as.integer(method) # stopifnot(1 <= method && method <= 5) # if (!is.fdf && !multimin.method.f[[method]]) # stop(paste( # "The optimization method '", multimin.method.names[[method]], # "' needs a derivative function.\nIf you don't want to provide ", # "one, these methods don't need derivatives:\n", # paste(subset(multimin.method.names, multimin.method.f), # collapse=", "), # ".", # sep="")) # if (is.fdf && !multimin.method.fdf[[method]]) # stop(paste( # "The optimization method '", multimin.method.names[[method]], # "' doesn't use derivatives.\nIf you want to exploit a ", # "derivative, use one of these methods:\n", # paste(subset(multimin.method.names, multimin.method.fdf), # collapse=", "), # ".", # sep="")) # # internal.state <- new.env() # internal.state$f <- body(function(x) f(x)) # internal.state$n <- n # internal.state$rho <- new.env() # if (is.fdf) { # internal.state$df <- body(function(x) df(x)) # internal.state$fdf <- body(fdf_) # } # # if (is.fdf) { # .Call("multimin_fdf_new", internal.state, x, method, step.size, # tol) # } else { # .Call("multimin_f_new", internal.state, x, method, step.size) # } # # list(internal.state = internal.state, x=x, f=NA, df=rep(NA, n), # is.fdf=is.fdf, method=multimin.method.names[[method]]) } multimin.iterate <- function(state) {stop("These functions have been temporarily removed pending a permanent fix") # internal.state <- state$internal.state # if (state$is.fdf) { # state$code <- .Call("multimin_fdf_iterate", internal.state) # state$x <- .Call("multimin_fdf_state_argmin", internal.state) # state$f <- .Call("multimin_fdf_state_min", internal.state) # state$df <- .Call("multimin_fdf_state_grad", internal.state) # } else { # state$code <- .Call("multimin_f_iterate", internal.state) # state$x <- .Call("multimin_f_state_argmin", internal.state) # state$f <- .Call("multimin_f_state_min", internal.state) # } # state } multimin.restart <- function(state) {stop("These functions have been temporarily removed pending a permanent fix") # if (state$is.fdf) # .Call("multimin_restart", state$internal.state) # state } ## Convergence criterion for Nelder-Mead multimin.fminimizer.size <- function(state) {stop("These functions have been temporarily removed pending a permanent fix") # stopifnot(!state$is.fdf) # .Call("multimin_fminimizer_size", state$internal.state) } gsl/R/transport.R0000644000176200001440000000472413443526307013435 0ustar liggesusers"transport_2" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("transport_2", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "transport_3" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("transport_3", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "transport_4" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("transport_4", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "transport_5" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("transport_5", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/clausen.R0000644000176200001440000000115713443526307013030 0ustar liggesusers"clausen" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("clausen_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/dilog.R0000644000176200001440000000304613443526307012473 0ustar liggesusers"dilog" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("dilog_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "complex_dilog" <- function(r, theta=NULL, give=FALSE, strict=TRUE){ if(is.null(theta)){ attr <- attributes(r) r.vec <- as.vector(Mod(r)) theta.vec <- as.vector(Arg(r)) } else { jj <- process.args(r,theta) r.vec <- jj$arg1 theta.vec <- jj$arg2 attr <- jj$attr } jj <- .C("complex_dilog_e", as.double(r.vec), as.double(theta.vec), # sharp-eyed bug report from Glenn Davis as.integer(length(r)), val_re=as.double(r.vec), val_im=as.double(r.vec), err_re=as.double(r.vec), err_im=as.double(r.vec), status=as.integer(0*r.vec), PACKAGE="gsl" ) val <- jj$val_re + 1i*jj$val_im err <- jj$err_re + 1i*jj$err_im status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(give){ return(list(val=val, err=err, status=status)) } else { return(val) } } gsl/R/synchrotron.R0000644000176200001440000000236313443526307013766 0ustar liggesusers"synchrotron_1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("synchrotron_1", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "synchrotron_2" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("synchrotron_2", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/qrng.R0000644000176200001440000000107613443526307012345 0ustar liggesusersqrng_alloc <- function(type = c("niederreiter_2", "sobol"), dim) { type <- switch(match.arg(type), niederreiter_2 = 0, sobol = 1) .Call("qrng_alloc", type, dim, PACKAGE = "gsl") } qrng_clone <- function(q) .Call("qrng_clone", q, PACKAGE = "gsl") qrng_init <- function(q) .Call("qrng_init", q, PACKAGE = "gsl") qrng_name <- function(q) .Call("qrng_name", q, PACKAGE = "gsl") qrng_size <- function(q) .Call("qrng_size", q, PACKAGE = "gsl") qrng_get <- function(q, n = 1) matrix(.Call("get_n", q, n, PACKAGE = "gsl"), nrow = n, byrow = TRUE) gsl/R/gegenbauer.R0000644000176200001440000000730613443526307013504 0ustar liggesusers"gegenpoly_1" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) lambda.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gegenpoly_1_e", as.double(lambda.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gegenpoly_2" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) lambda.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gegenpoly_2_e", as.double(lambda.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gegenpoly_3" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) lambda.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gegenpoly_3_e", as.double(lambda.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gegenpoly_n" <- function(n, lambda, x, give=FALSE, strict=TRUE){ if(length(n)>1){stop("length of n should be 1")} jj <- process.args(lambda,x) lambda.single <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gegenpoly_n_e", as.integer(n), as.double(lambda.single), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gegenpoly_array" <- function(nmax, lambda, x, give=FALSE,strict=TRUE){ if(length(nmax)>1){stop("nmax should be of length 1")} jj <- process.args(lambda,x) lambda.single <- jj$arg1 x.vec<- jj$arg2 attr <- jj$attr x.out <- rep(x.vec,(nmax+1)) jj <- .C("gegenpoly_array", as.integer(nmax), as.double(lambda.single), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax+1 , length(x.vec)) status <- jj$status attributes(status) <- attr err <- jj$err attributes(err) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/legendre.R0000644000176200001440000004671613443526307013175 0ustar liggesusers"legendre_P1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("legendre_P1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_P2" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("legendre_P2_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_P3" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("legendre_P3_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_Pl" <- function(l, x, give=FALSE, strict=TRUE){ jj <- process.args(l,x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("legendre_Pl_e", as.integer(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_Pl_array" <- function(lmax, x, give=FALSE, strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} attr <- attributes(x) lmax.single <- lmax x.vec <- as.vector(x) x.out <- rep(x.vec,(lmax+1)) jj <- .C("legendre_Pl_array", as.integer(lmax.single), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax.single+1 , length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "legendre_Q0" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("legendre_Q0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_Q1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("legendre_Q1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_Ql" <- function(l, x, give=FALSE, strict=TRUE){ jj <- process.args(l,x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("legendre_Ql_e", as.integer(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } ## put legendre_array_n() and legendre_array_index() first [even ## though they appear in the manual later] for ease of ## understanding */ "legendre_array_n" <- function(lmax){ stopifnot(length(lmax)==1) ans <- 1L jj <- .C("legendre_array_n", as.integer(lmax), as.integer(ans), PACKAGE="gsl" ) return(jj[[2]]) } "legendre_array_index" <- function(l,m){ stopifnot(length(l)==1) stopifnot(length(m)==1) ans <- 1L jj <- .C("legendre_array_index", as.integer(l), as.integer(m), as.integer(ans), PACKAGE = "gsl" ) return(jj[[3]]) } legendre_check_args <- function(x,lmax,norm,csphase){ stopifnot(length(x)==1) # avoids misunderstandings re vectorization stopifnot(length(lmax)==1) stopifnot(lmax>=0) # lmax=0 is OK stopifnot(length(norm)==1) stopifnot(norm %in% 1:4) stopifnot(length(csphase)==1) stopifnot(csphase %in% c(-1,1)) return(TRUE) } "legendre_array" <- function(x, lmax, norm=1, csphase= -1){ # canonical use: legendre_array(0.4,5) ## note re-ordering of arguments ignore <- legendre_check_args(x,lmax,norm,csphase) n <- legendre_array_n(lmax) jj <- .C("legendre_array", as.double(x), as.integer(lmax), as.integer(norm-1), # NB off-by-one error; norm=1 -> none, norm=1 -> Schmidt-semi, etc as.double(csphase), result_array = double(n), # scratch space out=double((lmax+1)*(lmax+1)) # also off-by-one; need 0,1,2,...,lmax ) return(matrix(jj$out,lmax+1,lmax+1)) } "legendre_deriv_array" <- function(x, lmax, norm=1, csphase= -1){ ignore <- legendre_check_args(x,lmax,norm,csphase) n <- legendre_array_n(lmax) jj <- .C("legendre_deriv_array", as.double(x), as.integer(lmax), as.integer(norm-1), as.double(csphase), result_array = double(n), result_deriv_array = double(n), out=double((lmax+1)*(lmax+1)) ) return(matrix(jj$out,lmax+1,lmax+1)) } "legendre_deriv_alt_array" <- function(x, lmax, norm=1, csphase= -1){ ignore <- legendre_check_args(x,lmax,norm,csphase) n <- legendre_array_n(lmax) jj <- .C("legendre_deriv_alt_array", as.double(x), as.integer(lmax), as.integer(norm-1), as.double(csphase), result_array = double(n), result_deriv_array = double(n), out=double((lmax+1)*(lmax+1)) ) return(matrix(jj$out,lmax+1,lmax+1)) } "legendre_deriv2_array" <- function(x, lmax, norm=1, csphase= -1){ ignore <- legendre_check_args(x,lmax,norm,csphase) n <- legendre_array_n(lmax) jj <- .C("legendre_deriv2_array", as.double(x), as.integer(lmax), as.integer(norm-1), as.double(csphase), result_array = double(n), result_deriv_array = double(n), result_deriv2_array = double(n), out=double((lmax+1)*(lmax+1)) ) return(matrix(jj$out,lmax+1,lmax+1)) } "legendre_deriv2_alt_array" <- function(x, lmax, norm=1, csphase= -1){ ignore <- legendre_check_args(x,lmax,norm,csphase) n <- legendre_array_n(lmax) jj <- .C("legendre_deriv2_alt_array", as.double(x), as.integer(lmax), as.integer(norm-1), as.double(csphase), result_array = double(n), result_deriv_array = double(n), result_deriv2_array = double(n), out=double((lmax+1)*(lmax+1)) ) return(matrix(jj$out,lmax+1,lmax+1)) } "legendre_Plm" <- function(l, m, x, give=FALSE, strict=TRUE){ jj <- process.args(l,m,x) l.vec <- jj$arg1 m.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("legendre_Plm_e", as.integer(l.vec), as.integer(m.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } deprecated_legendre <- function(...){ .Deprecated(new = "legendre_array", msg = "As of version 2.1, the GSL library has deprecated the following functions: gsl_sf_legendre_Plm_array gsl_sf_legendre_Plm_deriv_array gsl_sf_legendre_sphPlm_array gsl_sf_legendre_sphPlm_deriv_array gsl_sf_legendre_array_size The functionality is provided in GSL by the gsl_sf_legendre_array suite of functions; in R, use one of: legendre_array() legendre_deriv_array() legendre_deriv_alt_array() legendre_deriv2_array() legendre_deriv2_altarray() " ) } "legendre_Plm_array" <- deprecated_legendre "legendre_Plm_deriv_array" <- deprecated_legendre "legendre_sphPlm_array" <- deprecated_legendre "legendre_sphPlm_deriv_array" <- deprecated_legendre "legendre_array_size" <- deprecated_legendre "legendre_sphPlm" <- function(l, m, x, give=FALSE, strict=TRUE){ jj <- process.args(l,m,x) l.vec <- jj$arg1 m.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("legendre_sphPlm_e", as.integer(l.vec), as.integer(m.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } # "legendre_sphPlm_array" <- function(lmax, m, x, give=FALSE, strict=TRUE){ # if(length(lmax)>1){stop("lmax should be of length 1")} # if(length(m)>1){stop("m should be of length 1")} # lmax.single <- lmax # m.single <- m # x.vec <- as.vector(x) # x.out <- rep(x.vec,(lmax.single - m.single +1)) # jj <- .C("legendre_sphPlm_array", # as.integer(lmax.single), # as.integer(m.single), # as.double(x.vec), # as.integer(length(x.vec)), # val=as.double(x.out), # status=as.integer(x.vec), # PACKAGE="gsl" # ) # val <- jj$val # dim(val) <- c(lmax.single-m.single+1 , length(x.vec)) # status <- jj$status # attributes(status) <- attributes(x) # # if(strict){ # val <- strictify(val,status) # } # # if(give){ # return(list(val=val,status=status)) # } else { # return(val) # } # } "conicalP_half" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("conicalP_half_e", as.double(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "conicalP_mhalf" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("conicalP_mhalf_e", as.double(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "conicalP_0" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("conicalP_0_e", as.double(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "conicalP_1" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("conicalP_1_e", as.double(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "conicalP_sph_reg" <- function(l, lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(l, lambda,x) l.vec <- jj$arg1 lam.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("conicalP_sph_reg_e", as.integer(l.vec), as.double(lam.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "conicalP_cyl_reg" <- function(m, lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(m,lambda,x) m.vec <- jj$arg1 lam.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("conicalP_cyl_reg_e", as.integer(m.vec), as.double(lam.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_H3d_0" <- function(lambda, eta, give=FALSE, strict=TRUE){ jj <- process.args(lambda,eta) lam.vec <- jj$arg1 eta.vec <- jj$arg2 attr <- jj$attr jj <- .C("legendre_H3d_0_e", as.double(lam.vec), as.double(eta.vec), as.integer(length(lam.vec)), val=as.double(lam.vec), err=as.double(lam.vec), status=as.integer(lam.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_H3d_1" <- function(lambda, eta, give=FALSE, strict=TRUE){ jj <- process.args(lambda,eta) lam.vec <- jj$arg1 eta.vec <- jj$arg2 attr <- jj$attr jj <- .C("legendre_H3d_1_e", as.double(lam.vec), as.double(eta.vec), as.integer(length(lam.vec)), val=as.double(lam.vec), err=as.double(lam.vec), status=as.integer(lam.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_H3d" <- function(l, lambda, eta, give=FALSE, strict=TRUE){ jj <- process.args(l, lambda, eta) l.vec <- jj$arg1 lam.vec <- jj$arg2 eta.vec <- jj$arg3 attr <- jj$attr jj <- .C("legendre_H3d_e", as.integer(l.vec), as.double(lam.vec), as.double(eta.vec), as.integer(length(lam.vec)), val=as.double(lam.vec), err=as.double(lam.vec), status=as.integer(lam.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_H3d_array" <- function(lmax, lambda, eta, give=FALSE, strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} lmax.single <- lmax jj <- process.args(lambda,eta) lam.vec <- jj$arg1 eta.vec <- jj$arg2 attr <- jj$attr lam.out <- rep(lam.vec,(lmax+1)) jj <- .C("legendre_H3d_array", as.integer(lmax.single), as.double(lam.vec), as.double(eta.vec), as.integer(length(lam.vec)), val=as.double(lam.out), status=as.integer(lam.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax.single+1 , length(lam.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } gsl/R/ellint.R0000644000176200001440000001751113443526307012666 0ustar liggesusers"ellint_Kcomp" <- function(k, mode=0, give=FALSE, strict=TRUE){ attr <- attributes(k) if(length(mode)>1){stop("length of mode must be 1")} k.vec <- as.vector(k) jj <- .C("ellint_Kcomp_e", as.double(k.vec), as.integer(length(k.vec)), as.integer(mode), val=as.double(k.vec), err=as.double(k.vec), status=as.integer(0*k.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_Ecomp" <- function(k, mode=0, give=FALSE, strict=TRUE){ attr <- attributes(k) if(length(mode)>1){stop("length of mode must be 1")} k.vec <- as.vector(k) jj <- .C("ellint_Ecomp_e", as.double(k.vec), as.integer(length(k.vec)), as.integer(mode), val=as.double(k.vec), err=as.double(k.vec), status=as.integer(0*k.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_F" <- function(phi, k, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(phi,k) phi.vec <- jj$arg1 k.vec <- jj$arg2 attr <- jj$attr jj <- .C("ellint_F_e", as.double(phi.vec), as.double(k.vec), as.integer(length(k.vec)), as.integer(mode), val=as.double(k.vec), err=as.double(k.vec), status=as.integer(0*k.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_E" <- function(phi, k, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(phi,k) phi.vec <- jj$arg1 k.vec <- jj$arg2 attr <- jj$attr jj <- .C("ellint_E_e", as.double(phi.vec), as.double(k.vec), as.integer(length(k.vec)), as.integer(mode), val=as.double(k.vec), err=as.double(k.vec), status=as.integer(0*k.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_P" <- function(phi, k, n, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(phi,k,n) phi.vec <- jj$arg1 k.vec <- jj$arg2 n.vec <- jj$arg3 attr <- jj$attr jj <- .C("ellint_P_e", as.double(phi.vec), as.double(k.vec), as.double(n.vec), as.integer(length(k.vec)), as.integer(mode), val=as.double(k.vec), err=as.double(k.vec), status=as.integer(0*k.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_D" <- function(phi, k, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(phi,k) phi.vec <- jj$arg1 k.vec <- jj$arg2 attr <- jj$attr jj <- .C("ellint_D_e", as.double(phi.vec), as.double(k.vec), as.integer(length(k.vec)), as.integer(mode), val=as.double(k.vec), err=as.double(k.vec), status=as.integer(0*k.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_RC" <- function(x, y, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(x,y) x.vec <- jj$arg1 y.vec <- jj$arg2 attr <- jj$attr jj <- .C("ellint_RC_e", as.double(x.vec), as.double(y.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_RD" <- function(x, y, z, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(x,y,z) x.vec <- jj$arg1 y.vec <- jj$arg2 z.vec <- jj$arg3 attr <- jj$attr jj <- .C("ellint_RD_e", as.double(x.vec), as.double(y.vec), as.double(z.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_RF" <- function(x, y, z, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(x,y,z) x.vec <- jj$arg1 y.vec <- jj$arg2 z.vec <- jj$arg3 attr <- jj$attr jj <- .C("ellint_RF_e", as.double(x.vec), as.double(y.vec), as.double(z.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_RJ" <- function(x, y, z, p, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} if(length(p)>1){stop("length of p must be 1")} jj <- process.args(x,y,z) x.vec <- jj$arg1 y.vec <- jj$arg2 z.vec <- jj$arg3 attr <- jj$attr jj <- .C("ellint_RJ_e", as.double(x.vec), as.double(y.vec), as.double(z.vec), as.double(p), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/gamma.R0000644000176200001440000004035213443526307012460 0ustar liggesusers"gsl_sf_gamma" <- function(x,give=FALSE,strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("gamma_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lngamma" <- function(x,give=FALSE,strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("lngamma_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lngamma_sgn" <- function(x, give=FALSE,strict=TRUE){ jj <- process.args(x) x.vec <- jj$arg1 attr <- jj$attr jj <- .C("lngamma_sgn_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), sgn=as.double(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err sgn <- jj$sgn status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr attributes(sgn) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status,sgn=sgn)) } else { return(list(val=val,sgn=sgn)) } } "gammastar" <- function(x,give=FALSE,strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("gammastar_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gammainv" <- function(x,give=FALSE,strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("gammainv_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lngamma_complex" <- function(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE){ attr <- attributes(zr) if(is.null(zi)){ zi <- as.vector(Im(zr)) zr <- as.vector(Re(zr)) } else { zi <- as.vector(zi) zr <- as.vector(zr) } if(length(zr) !=length(zi)){stop("zr and zi must be of the same dimensions")} jj <- .C("lngamma_complex_e", as.double(zr), as.double(zi), as.integer(length(zr)), val_lnr=as.double(zr), val_arg=as.double(zr), err_lnr=as.double(zr), err_arg=as.double(zr), status=as.integer(0*zr), PACKAGE="gsl" ) val_lnr <- jj$val_lnr val_arg <- jj$val_arg err_lnr <- jj$err_lnr err_arg <- jj$err_arg status <- jj$status attributes(status) <- attr if(r.and.i){ # val <- exp(val_lnr)*cos(val_arg) + 1i*exp(val_lnr)*sin(val_arg) # err <- exp(xerr_lnr)*cos(err_arg) + 1i*exp(err_lnr)*sin(err_arg) val <- val_lnr + 1i*val_arg err <- err_lnr + 1i*err_arg attributes(val) <- attr attributes(err) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, err=err, status=status)) } else { return(val) } } else { attributes(val_lnr) <- attr attributes(val_arg) <- attr attributes(err_lnr) <- attr attributes(err_arg) <- attr if(strict){ val_lnr <- strictify(val_lnr,status) val_arg <- strictify(val_arg,status) } if(give){ return(list(val_lnr=val_lnr, val_arg=val_arg, err_lnr=err_lnr,err_arg=err_arg, status=status)) } else { return(list(val_lnr=val_lnr, val_arg=val_arg)) } } } "taylorcoeff" <- function(n, x ,give=FALSE,strict=TRUE){ jj <- process.args(n,x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("taylorcoeff_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fact" <- function(n, give=FALSE,strict=TRUE){ n.vec <- as.vector(n) attr <- attributes(n) jj <- .C("fact_e", as.integer(n), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(n) attributes(err) <- attributes(n) attributes(status) <- attributes(n) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "doublefact" <- function(n, give=FALSE,strict=TRUE){ n.vec <- as.vector(n) attr <- attributes(n) jj <- .C("doublefact_e", as.integer(n), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(n) attributes(err) <- attributes(n) attributes(status) <- attributes(n) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lnfact" <- function(n, give=FALSE,strict=TRUE){ n.vec <- as.vector(n) attr <- attributes(n) jj <- .C("lnfact_e", as.integer(n), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(n) attributes(err) <- attributes(n) attributes(status) <- attributes(n) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lndoublefact" <- function(n, give=FALSE,strict=TRUE){ n.vec <- as.vector(n) attr <- attributes(n) jj <- .C("lndoublefact_e", as.integer(n), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(n) attributes(err) <- attributes(n) attributes(status) <- attributes(n) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gsl_sf_choose" <- function(n, m, give=FALSE,strict=TRUE){ jj <- process.args(n,m) n.vec <- jj$arg1 m.vec <- jj$arg2 attr <- jj$attr jj <- .C("choose_e", as.integer(n.vec), as.integer(m.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(n) attributes(err) <- attributes(n) attributes(status) <- attributes(n) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lnchoose" <- function(n, m, give=FALSE,strict=TRUE){ jj <- process.args(n,m) n.vec <- jj$arg1 m.vec <- jj$arg2 attr <- jj$attr jj <- .C("lnchoose_e", as.integer(n.vec), as.integer(m.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(n) attributes(err) <- attributes(n) attributes(status) <- attributes(n) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "poch" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("poch_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lnpoch" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("lnpoch_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lnpoch_sgn" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("lnpoch_sgn_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), sgn=as.double(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err sgn <- jj$sgn status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr attributes(sgn) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status,sgn=sgn)) } else { return(list(val=val,sgn=sgn)) } } "pochrel" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("pochrel_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gamma_inc_Q" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gamma_inc_Q_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gamma_inc_P" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gamma_inc_P_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gamma_inc" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gamma_inc_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gsl_sf_beta" <- function(a, b, give=FALSE,strict=TRUE){ jj <- process.args(a,b) a.vec <- jj$arg1 b.vec <- jj$arg2 attr <- jj$attr jj <- .C("beta_e", as.double(a.vec), as.double(b.vec), as.integer(length(b.vec)), val=as.double(b.vec), err=as.double(b.vec), status=as.integer(0*b.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lnbeta" <- function(a, b, give=FALSE,strict=TRUE){ jj <- process.args(a,b) a.vec <- jj$arg1 b.vec <- jj$arg2 attr <- jj$attr jj <- .C("lnbeta_e", as.double(a.vec), as.double(b.vec), as.integer(length(b.vec)), val=as.double(b.vec), err=as.double(b.vec), status=as.integer(0*b.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "beta_inc" <- function(a, b, x, give=FALSE,strict=TRUE){ jj <- process.args(a,b,x) a.vec <- jj$arg1 b.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("beta_inc_e", as.double(a.vec), as.double(b.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/dawson.R0000644000176200001440000000115313443526307012665 0ustar liggesusers"dawson" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("dawson", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/zzz.R0000644000176200001440000000021513443526307012225 0ustar liggesusers#.First.lib <- function(lib, pkg) { # library.dynam("gsl", pkg, lib) #} .onLoad <- function(lib, pkg) { library.dynam("gsl", pkg, lib) } gsl/R/coupling.R0000644000176200001440000000621513443526307013216 0ustar liggesusers"coupling_3j" <- function(two_ja, two_jb, two_jc, two_ma, two_mb, two_mc, give=FALSE, strict=TRUE){ jj <- process.args(two_ja, two_jb, two_jc, two_ma, two_mb, two_mc) ja.vec <- jj$arg1 jb.vec <- jj$arg2 jc.vec <- jj$arg3 ma.vec <- jj$arg4 mb.vec <- jj$arg5 mc.vec <- jj$arg6 attr <- jj$attr jj <- .C("coupling_3j", as.integer(ja.vec), as.integer(jb.vec), as.integer(jc.vec), as.integer(ma.vec), as.integer(mb.vec), as.integer(mc.vec), as.integer(length(ja.vec)), val=as.double(ja.vec), err=as.double(ja.vec), status=as.integer(0*ja.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "coupling_6j" <- function(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, give=FALSE, strict=TRUE){ jj <- process.args(two_ja, two_jb, two_jc, two_jd, two_je, two_jf) ja.vec <- jj$arg1 jb.vec <- jj$arg2 jc.vec <- jj$arg3 jd.vec <- jj$arg4 je.vec <- jj$arg5 jf.vec <- jj$arg6 attr <- jj$attr jj <- .C("coupling_6j", as.integer(ja.vec), as.integer(jb.vec), as.integer(jc.vec), as.integer(jd.vec), as.integer(je.vec), as.integer(jf.vec), as.integer(length(ja.vec)), val=as.double(ja.vec), err=as.double(ja.vec), status=as.integer(0*ja.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "coupling_9j" <- function(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, two_jg, two_jh, two_ji, give=FALSE, strict=TRUE){ jj <- process.args(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, two_jg, two_jh, two_ji) ja.vec <- jj$arg1 jb.vec <- jj$arg2 jc.vec <- jj$arg3 jd.vec <- jj$arg4 je.vec <- jj$arg5 jf.vec <- jj$arg6 jg.vec <- jj$arg7 jh.vec <- jj$arg8 ji.vec <- jj$arg9 attr <- jj$attr jj <- .C("coupling_9j", as.integer(ja.vec), as.integer(jb.vec), as.integer(jc.vec), as.integer(jd.vec), as.integer(je.vec), as.integer(jf.vec), as.integer(jg.vec), as.integer(jh.vec), as.integer(ji.vec), as.integer(length(ja.vec)), val=as.double(ja.vec), err=as.double(ja.vec), status=as.integer(0*ja.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/vignettes/0000755000176200001440000000000013446020401013041 5ustar liggesusersgsl/vignettes/gslpaper.Rnw0000644000176200001440000002477513443526307015402 0ustar liggesusers% -*- mode: noweb; noweb-default-code-mode: R-mode; -*- \documentclass[nojss]{jss} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% declarations for jss.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% just as usual \author{Robin K. S. Hankin} \title{Special functions in \proglang{R}: introducing the \pkg{gsl} package} %\VignetteIndexEntry{A vignette for the gsl package} %% for pretty printing and a nice hypersummary also set: %% \Plainauthor{Achim Zeileis, Second Author} %% comma-separated \Plaintitle{Special functions in R: introducing the gsl package} \Shorttitle{The \pkg{gsl} package} \Abstract{ This vignette introduces the \pkg{gsl} package of \proglang{R} utilities for accessing the functions of the Gnu Scientific Library. An earlier version of this document was published as~\cite{hankin2006}. } \Keywords{\proglang{R}, special functions} \Plainkeywords{R, special functions} \Address{ Robin K. S. Hankin\\ Auckland University of Technology\\ AUT Tower\\ Wakefield Street\\ Auckland\\ New Zealand\\ E-mail: \email{hankin.robin@gmail.com} } %% need no \usepackage{Sweave.sty} \SweaveOpts{echo=FALSE} \begin{document} \section{Introduction} The Gnu Scientific Library (GSL) is a collection of numerical routines for scientific computing~\citep{galassi2005}. The routines are written in \proglang{C} and constitute a library for \proglang{C} programmers; the source code is distributed under the GNU General Public License. One stated aim of the GSL development effort is the development of wrappers for high level languages. The \proglang{R} programming language~\citep{rcore2008} is an environment for statistical computation and graphics. It consists of a language and a run-time environment with graphics and other features. Here I introduce \pkg{gsl}, an \proglang{R} package that allows direct access to many GSL functions, including all the special functions, from within an \proglang{R} session. The package is available on CRAN, \url{http://www.cran.r-project.org/}; the GSL is available at \url{http://www.gnu.org/software/gsl/}. \section{Package design philosophy} The package splits into two parts: the special functions, written by the author; and the \pkg{rng} and \pkg{qrng} functionality, written by Duncan Murdoch. These two parts are very different in implementation, yet follow a common desideratum, namely that the package be a transparent port of the GSL library. The package thus has the advantage of being easy to compare with the GSL, and easy to update verifiably. In this paper, the Airy functions are used to illustrate the package. They are typical of the package's capabilities and coding, and are relatively simple to understand, having only a single real argument. A brief definition, and an application in physics, is given in the appendix. The package is organized into units that correspond to the GSL header file. Thus all the Airy functions are defined in a single header file, \code{gsl\_sf\_airy.h}. The package thus contains a corresponding \proglang{C} file, \code{airy.c}; an \proglang{R} file \code{airy.R}, and a documentation file \code{Airy.Rd}. These three files together encapsulate the functionality defined in \code{gsl\_sf\_airy.h} in the context of an \proglang{R} package. This structure makes it demonstrable that the GSL has been systematically and completely wrapped. Functions are named such that one can identify a function in the GSL manual, and the corresponding \proglang{R} command will be the same but with the prefix\footnote{Some functions, such as \code{gsl\_sf\_sin()}, retain the prefix to avoid conflicts. A full list is given in \code{Misc.Rd}.} and, if present, the ``\code{\_e}'' suffix, removed. In the case of the special functions, the prefix is ``\code{gsl\_sf\_}''. Thus, GSL function \code{gsl\_sf\_airy\_Ai\_e()} of header file \code{gsl\_sf\_airy.h} is called, via intermediate \proglang{C} routine \code{airy\_Ai\_e()}, by \proglang{R} function \code{airy\_Ai()}. Documentation is provided for every function defined in \code{gsl\_sf\_airy.h} under \code{Airy.Rd}. The \pkg{gsl} package is not intended to add any numerical functionality to the GSL, although here and there I have implemented slight extensions such as the Jacobian elliptic functions whose \proglang{R} ports take a complex argument. \subsection{Package documentation} The \pkg{gsl} package is unusual in that its documentation consists almost entirely of pointers to the GSL reference manual~\citep{galassi2005}, and~\citet{abramowitz1965}. This follows from the transparent wrapper philosophy. In any case, the GSL reference manual would strictly dominate the \code{Rd} files of the \pkg{gsl} package. \section[Package gsl in use]{Package \pkg{gsl} in use} <>= <>= library(gsl) @ Most functions in the package are straightforwardly and transparently executable: <>= airy_Ai(1:3) @ The online helpfiles include many examples that reproduce graphs and tables that appear in \citeauthor{abramowitz1965}. This constitutes a useful check on the routines. For example, figures~\ref{airyfig_A} and~\ref{airyfig_B} show an approximate reproduction of their figures~10.6 and~10.7 (page~446). \begin{figure}[htbp] \begin{center} <>= x <- seq(from=0,to=10,len=100) plot(c(0,11),c(-1,1),type="n",main="Fig 10.6, p446",xlab="",ylab="",yaxt="n",xaxt="n",frame=FALSE) axis(1,pos=0,at=c(0,2,4,6,8,10),labels=c("","2","4","6","8","10")) axis(2,pos=0) lines(x,airy_Ai ( x),type="l",lty=1) lines(x,airy_Ai (-x),type="l",lty=2) lines(x,airy_Ai_deriv ( x),type="l",lty=3) lines(x,airy_Ai_deriv (-x),type="l",lty=4) text(1,0.6 ,"Ai(-x)" ) text(0.85,0.33 ,"Ai(x)" ) text(1.08,-0.26,"Ai'(x)" ) text(10.5,0.4 ,"Ai'(-x)") arrows(10, 0, 11, 0,angle=11) text(11,-0.1,"x") @ \caption{Functions~$\mathrm{Ai}(\pm x)$ \label{airyfig_A} and~$\mathrm{Ai}'(\pm x)$ as plotted in the helpfile for \code{airy\_Ai()} and appearing on page~446 of~\citet{abramowitz1965}} \end{center} \end{figure} \begin{figure}[htbp] \begin{center} <>= x <- seq(from=0,to=10,len=100) plot(c(0,10),c(-1,2.2),type="n",main="Fig 10.7, p446",xlab="",ylab="",yaxt="n",xaxt="n",frame=FALSE) axis(1,pos=0,at=c(0,1:9),labels=c("","1","2","3","4","5","6","7","8","9")) axis(2,pos=0) lines(x,airy_Bi ( x),type="l",lty=1) lines(x,airy_Bi (-x),type="l",lty=2) lines(x,airy_Bi_deriv ( x),type="l",lty=3) lines(x,airy_Bi_deriv (-x),type="l",lty=4) text(0.15,1.44 ,"Bi(x)",pos=4) text(1,0.90 ,"Bi'(x)",pos=4) text(2.25,0.56,"Bi'(-x)") text(0.7,-0.55,"Bi'(-x)",pos=4) arrows(9, 0, 10, 0, angle=11) text(10,-0.1,"x") @ \caption{Functions~$\mathrm{Bi}(\pm x)$ \label{airyfig_B} and~$\mathrm{Bi}'(\pm x)$ \citep{abramowitz1965}} \end{center} \end{figure} \section{Summary} The \pkg{gsl} package is a transparent \proglang{R} wrapper for the Gnu Scientific Library. It gives access to all the special functions, and the quasi-random sequence generation routines. Notation follows the GSL as closely as reasonably practicable; many graphs and tables appearing in \citeauthor{abramowitz1965} are reproduced by the examples in the helpfiles. \subsubsection*{Acknowledgments} I would like to acknowledge the many stimulating and helpful comments made by the \proglang{R}-help list over the years. \bibliography{gsl} \section*{Appendix: The Airy function and an application in quantum mechanics} The Airy function may not be familiar to some readers; here, I give a brief introduction to it and illustrate the \pkg{gsl} package in use in a physical context. The standard reference is~\citet{vallee2004}. For real argument~$x$, the Airy function is defined by the integral \begin{equation} \mathrm{Ai}(x)=\frac{1}{\pi}\int_0^\infty \cos\left(t^3/3+xt\right)\,dt\end{equation} and obeys the differential equation~$y''=xy$ (the other solution is denoted~$\mathrm{Bi}(x)$). In the field of quantum mechanics, one often considers the problem of a particle confined to a potential well that has a well-specified form. Here, I consider a potential of the form \begin{equation}\label{potential} V(r) = \left\{\begin{array}{ll} r & \mbox{if~$r>0$}\\ \infty & \mbox{if~$r\leq 0$}\\ \end{array} \right. \end{equation} Under such circumstances, the energy spectrum is discrete and the energy~$E_n$ corresponds to the $n^{\rm th}$ quantum state, denoted by $\psi_n$. If the mass of the particle is~$m$, it is governed by the Schr\"{o}dinger equation \begin{equation} \frac{d^2\psi_n(r)}{dr^2} + \frac{2m}{\hbar^2}\left(E_n-r\right)\psi_n(r)=0 \end{equation} Changing variables to $\xi=\left(E_n-e\right)\left(2m/\hbar\right)^{1/3}$ yields the Airy equation, viz \begin{equation} \frac{d^2\psi_n}{d\xi^2}+\xi\psi_n=0\end{equation} with solution \begin{equation} \psi_n(\xi)=N\mathrm{Ai}\left(-\xi\right) \end{equation} where $N$ is a normalizing constant (the~$\mathrm{Bi}\left(\cdot\right)$ term is omitted as it tends to infinity with increasing~$r$). Demanding that~$\psi_n(0)=0$ gives \[ E_n=-a_{n+1}\left(\hbar^2/2m\right)^{1/3} \] where~$a_n$ is the $n^{\rm th}$ root of the~$\mathrm{Ai}$ function [\code{Airy\_zero\_Ai()} in the package]; the off-by-one mismatch is due to the convention that the ground state is conventionally labelled state zero, not state~1. Thus, for example, $E_2=\mbox{\Sexpr{-round(airy_zero_Ai(3),4)}}\left(\hbar^2/2m\right)^{1/3}$. The normalization factor~$N$ is determined by requiring that $\int_0^\infty\psi^*\psi\,dr=1$ (physically, the particle is known to be somewhere with~$r>0$). It can be shown that \[ N=\frac{\left(2m/\hbar\right)^{1/6}}{\mathrm{Ai}'\left(a_n\right)}\] [the denominator is given by function \code{airy\_zero\_Ai\_deriv()} in the package] and the full solution is thus given by \begin{equation} \psi_n(r)=\frac{\left(2m/\hbar\right)^{1/6}} {\mathrm{Ai}'\left(a_n\right)} \mathrm{Ai}\left[ \left(\frac{2m}{\hbar}\right)^{1/3}\left(r-E_n\right)\right]. \end{equation} Figure~\ref{qm} shows the first six energy levels and the corresponding wave functions. \begin{figure}[htbp] \begin{center} <>= f <- function(r,n){ -airy_Ai(r+airy_zero_Ai(n+1))/airy_zero_Ai_deriv(n+1)} plot(c(0,10),c(0,10),type="l",yaxt="n",xaxt="n",frame=FALSE,xlab="r",ylab="V(r)") axis(1,pos=0) axis(2,pos=0) x <- seq(from=0,to=10,len=400) for(i in 0:5){ jj <- -airy_zero_Ai(i+1) lines(x=c(0,jj),y=c(jj,jj)) lines(x=c(jj,10),y=c(jj,jj),col="gray",lty=2) points(x,(i+1)*(-1)^i*f(x,i)+jj,type="l") } @ \caption{First six energy levels of a particle\label{qm} in a potential well (diagonal line) given by equation~\ref{potential}} \end{center} \end{figure} \end{document} gsl/vignettes/gsl.bib0000644000176200001440000000223313443526307014321 0ustar liggesusers @Manual{rcore2008, title = {\proglang{R}: A Language and Environment for Statistical Computing}, author = {{\proglang{R} Development Core Team}}, organization = {\proglang{R} Foundation for Statistical Computing}, address = {Vienna, Austria}, year = {2008}, note = {{ISBN} 3-900051-07-0}, url = {http://www.R-project.org}, } @Book{abramowitz1965, author = {M. Abramowitz and I. A. Stegun}, title = {Handbook of mathematical functions}, publisher = {New York: Dover}, year = {1965} } @Manual{galassi2005, title = {GNU Scientific Library}, author = {M. Galassi and others}, year = {2005}, note = {Reference Manual edition 1.7, for GSL version 1.7; 13 September 2005} } @Book{vallee2004, author = {O. Vall\'{e}e and M. Soares}, title = {{A}iry functions and applications to physics}, publisher = {World Scientific}, year = {2004}, } @Article{hankin2006, author = {R. K. S. Hankin}, title = {Special functions in \proglang{R}: introducing the \pkg{gsl} package}, journal = {\proglang{R} News}, year = {2006}, volume = {6}, number = {4}, pages = {24--26}, month = {October} } gsl/MD50000644000176200001440000001233513446115353011360 0ustar liggesusers649abe7d65384b5cc354f90c7570570b *DESCRIPTION 9bbbfd7e24e23face00d261cf4d4ab25 *INSTALL ec67552702abab9a4659ee613d367980 *NAMESPACE 49451ef3da39ad3348db4efb9897229d *R/aaa.R 03ae4d3fba892312f51e5a3ffc7c0fb8 *R/airy.R fe8b740941ba5d4db46c06d91d2ea184 *R/bessel.R 61255f0011b035b698429c8da5141340 *R/clausen.R de72c950c76e237e2fd95d3e106479b3 *R/coulomb.R efda650f9c08a18868753656bbbc5f0b *R/coupling.R 94cb908c3c33996631a6f45b922a03d0 *R/dawson.R 4a6908299abee1012008c12ebdc78405 *R/debye.R 86c73ed966d517db954648f3af722988 *R/dilog.R 475580f14fd9545f05d696c380ae9c12 *R/ellint.R cc8b5050e1462ac3110d9f2d0a77b8a7 *R/elljac.R e387ea917edc9ce5dbf7fcd3d59fc3ee *R/error.R 90d4e6fe350e81ea1cbe11d34ad9325f *R/expint.R 52a98ad52b5f6afa08b023eb5d31af23 *R/fermi_dirac.R 92b6a84fdd23cbbe7635f6a323671109 *R/gamma.R f9d7db5fa4d762593d8ad45588db054f *R/gegenbauer.R f4d90b1eaed0d5431fb72f7cd017ccbb *R/hyperg.R 30d4268d469da729d11365cdc884ed8f *R/laguerre.R 91b6b722747196034cbd2a190c1a6282 *R/lambert.R 41075a8683d6bc3ed1ac78aef384bd70 *R/legendre.R 7ab481dd8fe0647da9d8094073e20203 *R/log.R 7366f85a711ffe092742b3afce23dd42 *R/multimin.R e173f4cb4f3c07696d5249c5f9727906 *R/poly.R af87996572694b59ae73f4481c37ced6 *R/pow_int.R f2606a5708629a1b4ebc401b857ba00d *R/psi.R 4e229aa5ab820bf6425a7edcbec4fa7f *R/qrng.R 9fc85ca081cf5f3bce21eb6e9caaef3d *R/rng.R 2b2d469586da281ae2782b18f48ed6c0 *R/synchrotron.R 5552758765d21274f3928f649090c79e *R/transport.R 699c11587bc6e03c24f909f22cf36a83 *R/trig.R 81e928a7d5059c7af5ac33ffb1a15184 *R/zeta.R db9a953c82fb5bcad9aee1bc7c6c053a *R/zzz.R 9db71a91fff4480714d0e18bb466bbcb *build/partial.rdb 8b5202138a1af0cd2b8472a757fe033b *build/vignette.rds 67c9db5dc1a8e12ccf5880ffe206ce56 *cleanup 81285ddfdda408289378d4cef056af0f *configure b9367294f0df9c1dc99d297fed74a8a2 *configure.ac 9b41e88ea44e84f9978a41ff0dc98b8f *inst/CITATION e2b59fe3fff2bcb30599893a7e590f33 *inst/doc/gslpaper.R 3301d42c84eae58199688edf0b89e67b *inst/doc/gslpaper.Rnw 7e49c289dcb15e4e6da7fffdf6a099d8 *inst/doc/gslpaper.pdf 51d22603a282e6d49b45ba6f45fefddf *man/Airy.Rd 6c1c6ddc0dfcd8b73ef6ffed42e65ba0 *man/Bessel.Rd 7d06ff3c77d8b2a663b248a738856421 *man/Clausen.Rd 98fcac9cb7de51d8ae7a02a8428905ee *man/Coulomb.Rd a63db4302c02307146d1504bb54c8f18 *man/Coupling.Rd 4a7355ebd30b7970506e83a6447879a8 *man/Dawson.Rd f63c29f8bd18f8b2d04050ae787ab721 *man/Debye.Rd 116a4e433bb40c8969cc69478c780a8b *man/Dilog.Rd 123c16167012bd4af56e16b0541b9b0c *man/Ellint.Rd bf62c520b78449c16488f54426154a0f *man/Elljac.Rd a707476dd10acc585e182fdc9e742cef *man/Error.Rd a68fc01c74086fbe4215a040835cb356 *man/Expint.Rd 21fc303dd51814ac56b8f9945462810c *man/Fermi-Dirac.Rd 91fdccdf6653b108c8f0b77f547b5d10 *man/Gamma.Rd 00622a95ada338dcbc21acf1bff59feb *man/Gegenbauer.Rd c72660ed0e2d7d8f9b92e453d982b7cd *man/Hyperg.Rd f78f226b9aa79693a19b74968a783776 *man/Laguerre.Rd 8a9bb1531e6daeee4460076ce7233e55 *man/Lambert.Rd 4f069526c09444d3fc42d467d0966cb8 *man/Legendre.Rd fabe389c3bb31b21bf9988cdd34d0568 *man/Log.Rd 4dedc46dadcd50abb618d91ddd47dbf2 *man/Misc.Rd c8764d51a3dbaea8895214e327625f8b *man/Multimin.Rd 20679f03d67f003db906ad6080c14010 *man/Poly.Rd c80c94e5141fde7e2f8dc0b1753bad1f *man/Pow_int.Rd 665abe851396c66c7dc967c30b340e7c *man/Psi.Rd 20550c18fc17531e21be84f9ede97456 *man/Qrng.Rd 96ff7fb8a6c5ad43c2084c0dad64cab0 *man/Rng.Rd 3aa9bebddffb9ebb60599b323dcbfaf1 *man/Synchrotron.Rd 57d6dbff81380238bedb2d82318016a3 *man/Transport.Rd b5c53e7002df8b21fe5eae10d0b0d587 *man/Trig.Rd 8af97a7a2f2381c6f4eda9226854e0a6 *man/Zeta.Rd 4bb56776dffff3fbdba374b364801115 *man/gsl-deprecated.Rd b89d47e33ec31bb638c099b3c063b294 *man/gsl-package.Rd 417be231e3b2ad76fb58f63e6282a843 *src/Makevars.in 3f7c071f1a65529da9c401162d49a54a *src/Makevars.win d3d81b3b8812de332f9ca2256ec35c60 *src/airy.c 7604a6ee8ac13f0cc2a75ad3ece65bda *src/bessel.c aa0315936933b9c23ad7aceccebca9e9 *src/clausen.c a48435626cff7f5e673d8e74c55086c0 *src/coulomb.c a0f8436540668edc1eebf7d90ac561fb *src/coupling.c 79a5b954466be25ed10afadeaebe2186 *src/dawson.c 348e4834165e442fb6be7355dd4af1da *src/debye.c c8b861498b3837da259d8ddd1ab782a0 *src/dilog.c fe09d8852d449ab25a03e57b93d3a766 *src/ellint.c 9eacff2997558f2810c2d7711b0ecade *src/elljac.c 954a9f1a7f5bb332f97a1ed9eed53e68 *src/error.c 73afce7b8dd97edc8a9816613c55688f *src/expint.c ec31473b1e14580d10a190b0f58b491a *src/fermi_dirac.c 6726e36122403c2317b79f2f0b081aca *src/gamma.c f2fb1a5af376fe1cd75078eadbc02d15 *src/gegenbauer.c 2152f80c0bbd879134c8fd56f9ae50fa *src/hyperg.c e024911ad413adf68e6b441588b03c7d *src/init.c 892000e15e29220ee82b7d9075500c4e *src/laguerre.c cc1b1448fd81ea0a5e1be7d6993ab630 *src/lambert.c 0c17ca1e2f0056dc8a46caf73aaf2979 *src/legendre.c b02fed23a674a60be08a6e2036580ddd *src/log.c 5a89fb1b136c3dcbef79e74677081cc8 *src/poly.c 58d4765885884c1c4df37ed9c2171037 *src/pow_int.c 709817127e20690a234e5cca6337a3ae *src/psi.c 4c2209f42efd0a798b06e63db7080f1a *src/qrng.c 196d138d9b36df09956f2155533bf592 *src/rng.c e5bff4e4f34b161c5614cfcd0f80d705 *src/synchrotron.c 3d930d3d06dc965f4a07c64195ad9b0a *src/transport.c eaa60b954d9f69a70e558f17c0d9d86e *src/trig.c 58ad72acc96459be2e809ba64f4a5331 *src/vector.c 0597d273827001e0b130065ead9c76b4 *src/vector.h e5230800b5a109e8f97b72df7395d56b *src/zeta.c 47c7066e7d5968a2a5d6d279640fad82 *vignettes/gsl.bib 3301d42c84eae58199688edf0b89e67b *vignettes/gslpaper.Rnw gsl/build/0000755000176200001440000000000013446020401012130 5ustar liggesusersgsl/build/vignette.rds0000644000176200001440000000033213446020401014465 0ustar liggesusersuQ0 T&&;0!\X$r(LmҮ[k_KĴ)&aD7E)o\yRn tlhU?q зztCtmJ׻OgibfV wrF{>X`bȎ ~rg; Zץ?@L1 5['Zl,ClpoP|{py~~Y-V_.Kr[(ڽ\(U꺡vrEY, U,0̗WC5Ϗȏ/@4}fߩHê:.] f~ `p7urNZmK97Ёwظ ^l3-i!#%Z{ʲNz!2I[/PEJH/]^.) u8`+)}<َ, >#:0Y}~gu`uэ|LH'}eRvjQI7jpLj6ikg/NdD~ ^RMlVٳlhY';+d[ز} $F@m=p ^֓e>a/NQFyG{_5nΪЈ_[ԟ>e8+++tvN荪9\2r_l?)h WⶬuBR Pl4כu%F\A3Ӷ؜?SϐlN:W0PLSS@*22d3u.uȡ*=OXUX{ܫ^iM 9^hߺ9B r@zZvv;B&\ '$^/Y6&WBPYeMSǐkq}SKF $!A4Fė KЂ.Rwjw ng%.o/#},Fk%Ɍ#ؚIp hM 5;njA143iHHIkyrbBӬk/rCH #KI#1CWY;T>.5RKS \K %j^M@ldcM3v%j=d>_]/e]hqB0qnh5Tɦt7 M8s*YsAմl*ҷQ:x ѻ )ʦ$iJ !"=(,[A#IdQ !#=B wBK %z=lg~`9ӇN~;(ң3Q` 2wLJVE7s3$us3dOjȶ 些Vuc5w;kp/XU5ov /KO6(*]??;XY&:", aZ$[7U[;ybuGuիٚ2o'TA"iX6|^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ientific Library Authors@R: c(person(given=c("Robin", "K. S."), family="Hankin", role = c("aut","cre"), email="hankin.robin@gmail.com", comment = c(ORCID = "0000-0001-5982-0415")), person(given="Andrew",family="Clausen",role="ctb",comment="multimin functionality"), person(given="Duncan",family="Murdoch",role="ctb",comment="qrng functions")) SystemRequirements: Gnu Scientific Library version >= 2.1 Description: An R wrapper for some of the functionality of the Gnu Scientific Library. Maintainer: Robin K. S. Hankin License: GPL-3 URL: https://github.com/RobinHankin/gsl.git BugReports: https://github.com/RobinHankin/gsl/issues NeedsCompilation: yes Packaged: 2019-03-25 00:29:54 UTC; rhankin Author: Robin K. S. Hankin [aut, cre] (), Andrew Clausen [ctb] (multimin functionality), Duncan Murdoch [ctb] (qrng functions) Repository: CRAN Date/Publication: 2019-03-25 09:10:03 UTC gsl/configure0000755000176200001440000033201713446020402012747 0ustar liggesusers#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="src/airy.c" ac_subst_vars='LTLIBOBJS LIBOBJS GSL_LIBS GSL_CFLAGS OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC GSL_CONFIG target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu #AC_CHECK_LIB(gsl, gsl_sf_airy_Ai_e, # [LIBS="${LIBS} -lgsl -lgslcblas"], # [AC_MSG_ERROR([Cannot find Gnu Scientific Library.])], # [-lgslcblas]) #AC_CHECK_HEADER([gsl/gsl_version.h], , # [AC_MSG_ERROR([Cannot find GSL headers.])]) # Following lines kindly supplied by Dirk Eddelbuettel ## Use gsl-config to find arguments for compiler and linker flags ## ## Check for non-standard programs: gsl-config(1) # Extract the first word of "gsl-config", so it can be a program name with args. set dummy gsl-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GSL_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $GSL_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GSL_CONFIG="$GSL_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GSL_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GSL_CONFIG=$ac_cv_path_GSL_CONFIG if test -n "$GSL_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GSL_CONFIG" >&5 $as_echo "$GSL_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ## If gsl-config was found, let's use it if test "${GSL_CONFIG}" != ""; then # Use gsl-config for header and linker arguments GSL_CFLAGS=`${GSL_CONFIG} --cflags` GSL_LIBS=`${GSL_CONFIG} --libs` CFLAGS="$CFLAGS $GSL_CFLAGS" # kindly supplied by Ray Brownrigg else as_fn_error $? "gsl-config not found, is GSL installed?" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if GSL version >= 2.1" >&5 $as_echo_n "checking if GSL version >= 2.1... " >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test "$cross_compiling" = yes; then : gsl_version_ok=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main() { #ifdef GSL_VERSION int major, minor; char *gslv = GSL_VERSION; if ((sscanf(gslv, "%d.%d", &major, &minor)) != 2) { exit (1); } exit (minor < 1); exit (major < 2); #else exit(1); #endif } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gsl_version_ok=yes else gsl_version_ok=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "${gsl_version_ok}" = no; then as_fn_error $? "Need GSL version >= 1.16" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi # Now substitute these variables in src/Makevars.in to create src/Makevars ac_config_files="$ac_config_files src/Makevars" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/Makevars") CONFIG_FILES="$CONFIG_FILES src/Makevars" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi gsl/man/0000755000176200001440000000000013443526307011621 5ustar liggesusersgsl/man/Error.Rd0000644000176200001440000000242413443536737013213 0ustar liggesusers\name{Error} \alias{error} \alias{Error} \alias{Error function} \alias{erf} \alias{erfc} \alias{log_erfc} \alias{log_erf_Z} \alias{erf_Q} \alias{erf_Z} \alias{hazard} \title{Error functions} \description{ Error functions as per the Gnu Scientific Library, reference manual section 7.15 and AMS-55, chapter 7. Thes functions are declared in header file \code{gsl_sf_error.h} } \usage{ erf(x, mode=0, give=FALSE, strict=TRUE) erfc(x, mode=0, give=FALSE, strict=TRUE) log_erfc(x, mode=0, give=FALSE, strict=TRUE) erf_Q(x, mode=0, give=FALSE, strict=TRUE) hazard(x, mode=0, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{mode}{input: mode. For \code{GSL_PREC_DOUBLE} , \code{GSL_PREC_SINGLE}, \code{GSL_PREC_APPROX} use \code{0,1,2} respectively} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \details{ The zero functions return a status of \code{GSL_EDOM} and a value of \code{NA} for \eqn{n\leq 0}{n\leq 0} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ erf(0.745) # Example 1, page 304 } \keyword{array} gsl/man/Pow_int.Rd0000644000176200001440000000137213443526307013532 0ustar liggesusers\name{Powint} \alias{pow_int} \alias{Pow_int} \alias{powint} \title{Power functions} \description{ Power functions as per the Gnu Scientific Library reference manual section 7.27. These functions are declared in the header file \code{gsl_sf_pow_int.h} } \usage{ pow_int(x, n, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{n}{input: integer values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ pow_int(pi/2,1:10) } \keyword{array} gsl/man/Misc.Rd0000644000176200001440000000507213443526307013007 0ustar liggesusers\name{Misc} \alias{Misc} \alias{misc} \alias{process.args} \alias{strictify} \title{Argument processing and general info} \description{ Various widely used functions in the package } \usage{ process.args(...) strictify(val,status) } \arguments{ \item{...}{Argument list to be coerced to the same length} \item{val}{Value component of \code{&result}} \item{status}{status integer} } \details{ Function \code{process.args()} is an internal function used to massage the arguments into a form suitable for passing to \code{.C()}. For example, in function \code{hyperg_0F1(c,x)}, one wants each of \code{hyperg_0F1(0.1, c(0.3,0.4))} and \code{hyperg_0F1(c(0.1,0.2), 0.3)} and \code{hyperg_0F1(c(0.1,0.2),c(0.3,0.4))} to behave sensibly. Function \code{process.args()} is used widely in the package, taking an arbitrary number of arguments and returning a list whose elements are vectors of the same length. Most of the special functions use \code{process.args()} to ensure that the returned value takes the attributes of the input argument with most elements where possible. Function \code{strictify()} uses the \code{status} value returned by the \dQuote{error} form of the \acronym{GSL} special functions to make values returned with a nonzero \code{error} a \code{NaN}. In most of the special functions, \code{strictify()} is called if argument \code{strict} takes its default value of \code{TRUE}. Setting it to \code{FALSE} sometimes returns a numerical value as per the \acronym{GSL} reference manual. In most of the special functions, if argument \code{give} takes its default value of \code{FALSE}, only a numerical value is returned. If \code{TRUE}, error information and the status (see preceding paragraph) is also returned. Following tips found on R-devel: \enumerate{ \item Download and extract source code of R-package \pkg{gsl} \item Use \code{gsl-config --libs} to get the path to \acronym{GSL}'s lib directory (\code{-L}), use \code{gsl-config --cflags} to get the path to \code{GSL}'s include directory (\code{-I}) \item Change \code{Makevars} in \code{gsl/src}: \itemize{ \item Add \code{-L} to \code{PKG_LIBS} \item Add (new) line: \code{PKG_CPPFLAGS=-I} } \item Install \code{gsl} via \code{LDFLAGS=-L; export LDFLAGS} \code{CPPFLAGS=-I;export CPPFLAGS} \code{R CMD INSTALL gsl} } } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \keyword{array} gsl/man/Expint.Rd0000644000176200001440000000371213443526307013362 0ustar liggesusers\name{Expint} \alias{Expint} \alias{expint} \alias{expint_E1} \alias{expint_E2} \alias{expint_En} \alias{expint_Ei} \alias{Shi} \alias{Chi} \alias{expint_3} \alias{Si} \alias{Ci} \alias{atanint} \title{exponential functions} \description{ Expint functions as per the Gnu Scientific Library, reference manual section 7.17 and AMS-55, chapter 5. These functions are declared in header file \code{gsl_sf_expint.h}. } \usage{ expint_E1(x, give=FALSE, strict=TRUE) expint_E2(x, give=FALSE, strict=TRUE) expint_En(n, x, give=FALSE, strict=TRUE) expint_Ei(x, give=FALSE, strict=TRUE) Shi(x, give=FALSE, strict=TRUE) Chi(x, give=FALSE, strict=TRUE) expint_3(x, give=FALSE, strict=TRUE) Si(x, give=FALSE, strict=TRUE) Ci(x, give=FALSE, strict=TRUE) atanint(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{n}{input: integer values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \note{ Function \code{expint_En()} requires \acronym{GSL} version 1.8 or later. } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0.5, to=1, by=0.01) cbind(x,Si(x),Ci(x),expint_Ei(x),expint_E1(x)) #table 5.1 of AS, p239 x <- seq(from=0, to=12, len=100) plot(x,Ci(x),col="black",type="l",xaxt="n",yaxt="n",bty="n", xlab="",ylab="",main="Figure 5.6, p232", xlim=c(0,12),ylim=c(-1,2.0)) lines(x,Si(x)) axis(1,pos=0) axis(2,pos=0) abline(h=pi/2,lty=2) # Table 5.4, page 245: xvec <- seq(from=0,by=0.01,len=20) nvec <- c(2,3,4,10,20) x <- kronecker(xvec,t(rep(1,5))) n <- kronecker(t(nvec),rep(1,20)) ans <- cbind(x=xvec,expint_En(n,x)) rownames(ans) <- rep(" ",length(xvec)) colnames(ans) <- c("x",paste("n=",nvec,sep="")) class(ans) <- "I do not understand the first column" ans } \keyword{array} gsl/man/Debye.Rd0000644000176200001440000000167013443526307013144 0ustar liggesusers\name{Debye} \alias{Debye} \alias{debye} \alias{debye_1} \alias{debye_2} \alias{debye_3} \alias{debye_4} \title{Debye functions} \description{ Debye functions as per the Gnu Scientific Library, section 7.10 of the reference manual. These functions are declared in header file \code{gsl_sf_debye.h} } \usage{ debye_1(x, give=FALSE, strict=TRUE) debye_2(x, give=FALSE, strict=TRUE) debye_3(x, give=FALSE, strict=TRUE) debye_4(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=10,by=0.1) cbind(x,debye_1(x),debye_2(x),debye_3(x),debye_4(x)) #table 27.1 } \keyword{array} gsl/man/Poly.Rd0000644000176200001440000000263013443526307013034 0ustar liggesusers\name{Poly} \alias{Poly} \alias{poly} \alias{gsl_poly} \title{Polynomials} \description{ Polynomial functions as per the Gnu Scientific Library, reference manual section 6.1. These functions are defined in header file \code{gsl_poly.h} } \usage{ gsl_poly(c_gsl,x) } \arguments{ \item{c_gsl}{Coefficients of the poynomial (\code{c} in the function definition and the \acronym{GSL} ref manual) starting at the constant term and ending in the highest power; see details section. This argument is called \dQuote{\code{c_gsl}} (and not \dQuote{\code{c}}) to avoid confusion with \R function \code{c()}} \item{x}{input: real values} } \details{ One must be careful to avoid off-by-one errors. In C idiom, the function evaluates the polynomial \deqn{c[0]+c[1]x+c[2]x^2+\ldots+c[\mathrm{len}-1]x^{\mathrm{len}-1}}{c[0]+c[1]+...+c[len-1]x^(len-1)} where len is the second argument of \acronym{GSL} function \code{gsl_poly_eval()}. The \R idiom would be \deqn{c[1]+c[2]x+c[3]x^2+\ldots+c[\mathrm{len}]x^{\mathrm{len}-1}.}{c[1]+c[2]+...+c[len]x^(len-1).} This section is work-in-progress and more will be added when I have the time/need for the other functions here. } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ a <- matrix(1:4,2,2) rownames(a) <- letters[1:2] (jj <- gsl_poly(1:3,a)) jj-(1 + 2*a + 3*a^2) #should be small } \keyword{array} gsl/man/Qrng.Rd0000644000176200001440000000407413443526307013024 0ustar liggesusers\name{Qrng} \alias{Qrng} \alias{qrng} \alias{qrng_alloc} \alias{qrng_clone} \alias{qrng_init} \alias{qrng_name} \alias{qrng_size} \alias{qrng_get} \title{Quasi-random sequences} \description{ Quasi-random sequences as per the Gnu Scientific Library, reference manual section 18. These functions are declared in header file \code{gsl_qrng.h} } \usage{ qrng_alloc(type = c("niederreiter_2", "sobol"), dim) qrng_clone(q) qrng_init(q) qrng_name(q) qrng_size(q) qrng_get(q, n = 1) } \arguments{ \item{type}{Type of sequence} \item{dim}{Dimension of sequence} \item{q}{Generator from \code{qrng_alloc} or \code{qrng_clone}} \item{n}{How many vectors to generate} } \details{ These are wrappers for the quasi-random sequence functions from the \acronym{GSL} \url{http://www.gnu.org/software/gsl} with arguments corresponding to those from the library, with a few exceptions. In particular: I have used \code{dim} where the \acronym{GSL} uses just \code{d}; I have added the \code{n} argument to the \code{qrng_get} function, so that a single call can generate \code{n} vectors; I have not provided \R functions corresponding to \code{qrng_free} (because \R will automatically free the generator when it is garbage collected) or \code{qrng_state} or \code{qrng_memcpy} (because these don't make sense within \R.) } \value{ \code{qrng_alloc}, \code{qrng_clone} and \code{qrng_init} return an external pointer to the C structure representing the generator. The internals of this structure are not accessible from within \R. \code{qrng_name} returns a character vector giving the name of the generator. \code{qrng_size} returns an integer value giving the internal memory usage of the generator. \code{qrng_get} returns a matrix with \code{n} rows and \code{dim} columns. Each row is a vector in the quasi-random sequence. } \references{ \url{http://www.gnu.org/software/gsl} } \author{ Duncan Murdoch } \examples{ q <- qrng_alloc(dim = 2) qrng_name(q) qrng_get(q, 10) } \keyword{ datagen } \keyword{ distribution } gsl/man/Synchrotron.Rd0000644000176200001440000000145613443526307014446 0ustar liggesusers\name{Synchrotron} \alias{Synchrotron} \alias{synchrotron} \alias{synchrotron_1} \alias{synchrotron_2} \title{Synchrotron functions} \description{ Synchrotron functions as per the Gnu Scientific Library, reference section 7.29. These functions are declared in header file \code{gsl_sf_synchrotron.h} } \usage{ synchrotron_1(x, give=FALSE, strict=TRUE) synchrotron_2(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=2,by=0.01) synchrotron_1(x) synchrotron_2(x) } \keyword{array} gsl/man/Fermi-Dirac.Rd0000644000176200001440000000257113443526307014177 0ustar liggesusers\name{Fermi-Dirac} \alias{Fermi_Dirac} \alias{Fermi} \alias{fermi_dirac} \alias{fermi} \alias{fermi_dirac_m1} \alias{fermi_dirac_0} \alias{fermi_dirac_1} \alias{fermi_dirac_2} \alias{fermi_dirac_int} \alias{fermi_dirac_mhalf} \alias{fermi_dirac_half} \alias{fermi_dirac_3half} \alias{fermi_dirac_inc_0} \title{Fermi-Dirac functions} \description{ Fermi-Dirac functions as per the Gnu Scientific Library, reference manual section 7.18. These functions are declared in header file \code{gsl_sf_fermi_dirac.h} } \usage{ fermi_dirac_m1(x, give=FALSE, strict=TRUE) fermi_dirac_0(x, give=FALSE, strict=TRUE) fermi_dirac_1(x, give=FALSE, strict=TRUE) fermi_dirac_2(x, give=FALSE, strict=TRUE) fermi_dirac_int(j, x, give=FALSE, strict=TRUE) fermi_dirac_mhalf(x, give=FALSE, strict=TRUE) fermi_dirac_half(x, give=FALSE, strict=TRUE) fermi_dirac_3half(x, give=FALSE, strict=TRUE) fermi_dirac_inc_0(x, b, give=FALSE, strict=TRUE) } \arguments{ \item{x,j,b}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=2,by=0.01) fermi_dirac_m1(x) #table 7.5 of Ab and St } \keyword{array} gsl/man/Lambert.Rd0000644000176200001440000000154613443526307013504 0ustar liggesusers\name{Lambert} \alias{Lambert} \alias{lambert} \alias{lambert_W0} \alias{lambert_Wm1} \alias{Lambert_W0} \alias{Lambert_Wm1} \title{Lambert's W function} \description{ Lambert's W function as per the Gnu Scientific Library reference manual section 7.23. These functions are declared in header file \code{gsl_sf_lambert.h} } \usage{ lambert_W0(x, give=FALSE, strict=TRUE) lambert_Wm1(x, give=FALSE,strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ a <- runif(6) L <- lambert_W0(a) print(L*exp(L) - a) } \keyword{array} gsl/man/Zeta.Rd0000644000176200001440000000224013443526307013011 0ustar liggesusers\name{Zeta} \alias{Zeta} \alias{zeta_int} \alias{zeta} \alias{zetam1_int} \alias{zetam1} \alias{hzeta} \alias{eta_int} \alias{eta} \title{Zeta functions} \description{ Zeta functions as per the Gnu Scientific Library 7.31 and AMS-55, section 23.2. These functions are declared in header file \code{gsl_sf_zeta.h} } \usage{ zeta_int(n, give=FALSE, strict=TRUE) zeta(s, give=FALSE, strict=TRUE) zetam1_int(n, give=FALSE, strict=TRUE) zetam1(s, give=FALSE, strict=TRUE) hzeta(s, q, give=FALSE, strict=TRUE) eta_int(n, give=FALSE, strict=TRUE) eta(s, give=FALSE, strict=TRUE) } \arguments{ \item{n}{input: integer values} \item{s,q}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number.} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error.} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ n <- 1:10 cbind(n,zeta(n),eta(n)) #table 23.3, p 811 zeta_int(1:5) zeta(c(pi,pi*2)) zetam1_int(1:5) zetam1(c(pi,pi*2)) hzeta(1.1,1.2) eta_int(1:5) eta(c(pi,pi*2)) } \keyword{array} gsl/man/Log.Rd0000644000176200001440000000300713443526307012631 0ustar liggesusers\name{Log} \alias{Log} \alias{log} \alias{gsl_sf_log} \alias{log_abs} \alias{complex_log} \alias{log_1plusx} \alias{log_1plusx_mx} \title{Log functions} \description{ Log functions as per the Gnu Scientific Library, reference manual section 7.25 and AMS-55, chapter 4. These functions are declared in header file \code{gsl_sf_log.h} } \usage{ gsl_sf_log(x, give=FALSE, strict=TRUE) log_abs(x, give=FALSE, strict=TRUE) complex_log(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE) log_1plusx(x, give=FALSE, strict=TRUE) log_1plusx_mx(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{zr}{In \code{complex_log()}, the real part of the argument} \item{zi}{In \code{complex_log()}, the imaginary part of the argument. If missing (ie takes the default value of \code{NULL}), interpret \code{zr} as complex, even if real} \item{r.and.i}{In \code{complex_log()}, Boolean variable with default value of \code{TRUE} meaning to return a complex variable as per the details section below; and \code{FALSE} meaning to return the values as advertised in the \acronym{GSL} manual} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0.1,to=2,by=0.01) log(x) #table 7.5 of Ab and St } \keyword{array} gsl/man/Dilog.Rd0000644000176200001440000000256013443526307013151 0ustar liggesusers\name{Dilog} \alias{Dilog} \alias{dilog} \alias{polylog} \alias{complex_dilog} \title{Dilog functions} \description{ Dilog functions as per the Gnu Scientific Library reference manual section 7.11. These functions are declared in header file \code{gsl_sf_dilog.h} } \usage{ dilog(x, give=FALSE, strict=TRUE) complex_dilog(r, theta, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{r,theta}{In \code{complex_dilog()}, input values. If \code{theta} takes its default value of \code{NULL}, interpret \code{r} as a complex-valued object. If \code{theta} is non-null, interpret \code{r} as the Modulus, and \code{theta} as the argument, of the complex object passed to \code{gsl_sf_complex_dilog_e()}} \item{give}{Boolean, with default \code{FALSE} meaning to return just the answers, and \code{TRUE} meaning to return a status vector as well} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if nonzero status is returned by the \acronym{GSL} function (\code{FALSE} means to return the value: use with caution)} } \details{All functions as documented in the \acronym{GSL} reference manual section 7.11.} \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0, to=0.1,by=0.01) cbind(x,"f(x)"=dilog(1-x)) #table 27.7, p1005 } \keyword{array} gsl/man/Gegenbauer.Rd0000644000176200001440000000350213443526307014154 0ustar liggesusers\name{Gegenbauer} \alias{Gegenbauer} \alias{gegenbauer} \alias{gegenpoly_1} \alias{gegenpoly_2} \alias{gegenpoly_3} \alias{gegenpoly_n} \alias{gegenpoly_array} \title{Gegenbauer functions} \description{ Gegenbauer functions as per the Gnu Scientific Library reference manual section 7.20, and AMS-55, chapter 22. These functions are declared in header file \code{gsl_sf_gegenbauer.h} } \usage{ gegenpoly_1(lambda, x, give=FALSE,strict=TRUE) gegenpoly_2(lambda, x, give=FALSE,strict=TRUE) gegenpoly_3(lambda, x, give=FALSE,strict=TRUE) gegenpoly_n(n,lambda, x, give=FALSE,strict=TRUE) gegenpoly_array(nmax,lambda, x, give=FALSE,strict=TRUE) } \arguments{ \item{lambda,x}{input: real values} \item{n,nmax}{input: integer value} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error}} \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=-1 ,to=1,len=300) y <- gegenpoly_array(6,0.5,x) matplot(x,t(y[-(1:2),]), xlim=c(-1,1.2),ylim=c(-0.5,1.5), type="l",xaxt="n",yaxt="n",bty="n",xlab="",ylab="", main="Figure 22.5, p777",col="black") axis(1,pos=0) axis(2,pos=0) plot(x, gegenpoly_n(5,lambda=0.2, x,give=FALSE,strict=TRUE), xlim=c(-1,1),ylim=c(-1.5,1.5),main="Figure 22.5, p777", type="n",xaxt="n",yaxt="n",bty="n",xlab="",ylab="") lines(x, gegenpoly_n(5,lambda=0.2, x,give=FALSE,strict=TRUE)) lines(x, gegenpoly_n(5,lambda=0.4, x,give=FALSE,strict=TRUE)) lines(x, gegenpoly_n(5,lambda=0.6, x,give=FALSE,strict=TRUE)) lines(x, gegenpoly_n(5,lambda=0.8, x,give=FALSE,strict=TRUE)) lines(x, gegenpoly_n(5,lambda=1.0, x,give=FALSE,strict=TRUE)) axis(1,pos=0) axis(2,pos=0,las=1) } \keyword{array} gsl/man/Transport.Rd0000644000176200001440000000171313443526307014106 0ustar liggesusers\name{Transport} \alias{Transport} \alias{transport} \alias{transport_2} \alias{transport_3} \alias{transport_4} \alias{transport_5} \title{Transport functions} \description{ Transport functions as per the Gnu Scientific Library, reference manual section 7.29. These functions are defined in header file \code{gsl_sf_transport.h} } \usage{ transport_2(x, give=FALSE, strict=TRUE) transport_3(x, give=FALSE, strict=TRUE) transport_4(x, give=FALSE, strict=TRUE) transport_5(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number.} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error.} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=2,by=0.01) transport_2(x) transport_3(x) } \keyword{array} gsl/man/gsl-deprecated.Rd0000644000176200001440000000253113443526307014774 0ustar liggesusers\name{gsl-deprecated} \title{gsl-deprecated} \alias{gsl-deprecated} \alias{legendre_Plm_array} \alias{legendre_Plm_deriv_array} \alias{legendre_sphPlm_array} \alias{legendre_sphPlm_deriv_array} \alias{legendre_array_size} \alias{deprecated_legendre} \description{ Deprecated Legendre functions as per the Gnu Scientific Library reference manual section 7.24. } \usage{ legendre_Plm_array(...) legendre_Plm_deriv_array(...) legendre_sphPlm_array(...) legendre_sphPlm_deriv_array(...) legendre_array_size(...) deprecated_legendre(...) } \arguments{ \item{...}{(ignored)} } \note{ As of GSL-2.1, functions \itemize{ \item\code{gsl_sf_legendre_Plm_array} \item\code{gsl_sf_legendre_Plm_deriv_array} \item\code{gsl_sf_legendre_sphPlm_array} \item\code{gsl_sf_legendre_sphPlm_deriv_array} \item\code{gsl_sf_legendre_array_size} } are deprecated. This functionality is now provided in GSL by the \code{gsl_sf_legendre_array} suite of functions; in R, use one of: \itemize{ \item\code{legendre_array()} \item\code{legendre_deriv_array()} \item\code{legendre_deriv_alt_array()} \item\code{legendre_deriv2_array()} \item\code{legendre_deriv2_alt_array()}. } These are documented under \code{?Legendre}. } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \seealso{\code{\link{Legendre}}} \keyword{array} gsl/man/Gamma.Rd0000644000176200001440000000634013443526307013135 0ustar liggesusers\name{Gamma} \alias{Gamma} \alias{gamma} \alias{gsl_sf_gamma} \alias{lngamma} \alias{lngamma_sgn} \alias{gammastar} \alias{gammainv} \alias{lngamma_complex} \alias{taylorcoeff} \alias{fact} \alias{doublefact} \alias{lnfact} \alias{lndoublefact} \alias{gsl_sf_choose} \alias{lnchoose} \alias{poch} \alias{lnpoch} \alias{lnpoch_sgn} \alias{pochrel} \alias{gamma_inc_Q} \alias{gamma_inc_P} \alias{gamma_inc} \alias{gsl_sf_beta} \alias{lnbeta} \alias{beta_inc} \title{gamma functions} \description{ Gamma functions as per the Gnu Scientific Library reference manual section 7.19. These functions are declared in header file \code{gsl_sf_gamma.h} } \usage{ gsl_sf_gamma(x,give=FALSE,strict=TRUE) lngamma(x,give=FALSE,strict=TRUE) lngamma_sgn(x,give=FALSE,strict=TRUE) gammastar(x,give=FALSE,strict=TRUE) gammainv(x,give=FALSE,strict=TRUE) lngamma_complex(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE) taylorcoeff(n,x,give=FALSE,strict=TRUE) fact(n,give=FALSE,strict=TRUE) doublefact(n,give=FALSE,strict=TRUE) lnfact(n,give=FALSE,strict=TRUE) lndoublefact(n,give=FALSE,strict=TRUE) gsl_sf_choose(n,m,give=FALSE,strict=TRUE) lnchoose(n,m,give=FALSE,strict=TRUE) poch(a,x,give=FALSE,strict=TRUE) lnpoch(a,x,give=FALSE,strict=TRUE) lnpoch_sgn(a,x,give=FALSE,strict=TRUE) pochrel(a,x,give=FALSE,strict=TRUE) gamma_inc_Q(a,x,give=FALSE,strict=TRUE) gamma_inc_P(a,x,give=FALSE,strict=TRUE) gamma_inc(a,x,give=FALSE,strict=TRUE) gsl_sf_beta(a,b,give=FALSE,strict=TRUE) lnbeta(a,b,give=FALSE,strict=TRUE) beta_inc(a,b,x,give=FALSE,strict=TRUE) } \arguments{ \item{x,a,b}{input: real values} \item{m,n}{input: integer value} \item{zr}{In \code{gamma_complex()}, the real part of the argument} \item{zi}{In \code{gamma_complex()}, the imaginary part of the argument. If missing (ie takes the default value of \code{NULL}), interpret \code{zr} as complex, even if real} \item{r.and.i}{In \code{gamma_complex()}, Boolean variable with default value of \code{TRUE} meaning to return a complex variable as per the details section below; and \code{FALSE} meaning to return the values as advertised in the \acronym{GSL} manual} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \details{ All functions as documented in the \acronym{GSL} reference manual section 7.19. Note that \code{gamma_inc_P()} gives the area of the left tail of the gamma distribution so, for example, \code{gamma_inc_P(1.8, 5) = pgamma(5, 1.8)} to numerical accuracy. } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ gsl_sf_gamma(3) lngamma_complex(1+seq(from=0,to=5,by=0.1)*1i) #table 6.7, p 277 (LH col) #note 2pi phase diff jj <- expand.grid(1:10,2:5) x <- taylorcoeff(jj$Var1,jj$Var2) dim(x) <- c(10,4) x #table 23.5, p818 jj <- expand.grid(36:50,9:13) x <- gsl_sf_choose(jj$Var1,jj$Var2) dim(x) <- c(15,5) x #table 24.1, p829 (bottom bit) gamma_inc(1.2,1.3) beta(1.2, 1.3) lnbeta(1.2,1.55) beta_inc(1.2,1.4,1.6) gamma_inc_P(1.8, 5) - pgamma(5, 1.8) # should be small } \keyword{array} gsl/man/Multimin.Rd0000644000176200001440000001403413443526307013710 0ustar liggesusers\name{multimin} \alias{Multimin} \alias{multimin} \alias{multimin.init} \alias{multimin.iterate} \alias{multimin.restart} \alias{multimin.fminimizer.size} \title{Function minimization} \description{ \emph{These functions have been removed from the package temporarily, pending a permanent fix.} Function minimization using the Gnu Scientific Library, reference manual section 35. These functions are declared in header file \code{gsl_multimin.h} Several algorithms for finding (local) minima of functions in one or more variables are provided. All of the algorithms operate locally, in the sense that they maintain a best guess and require the function to be continuous. Apart from the Nelder-Mead algorithm, these algorithms also use a derivative. } \usage{ multimin(..., prec=0.0001) multimin.init(x, f, df=NA, fdf=NA, method=NA, step.size=NA, tol=NA) multimin.iterate(state) multimin.restart(state) multimin.fminimizer.size(state) } \arguments{ \item{...}{In function \code{multimin()}, the argument list passed to \code{multimin.init()}} \item{x}{A starting point. These algorithms are faster with better initial guesses} \item{f}{The function to minimize. This function must take a single \code{numeric} vector as input, and output a \code{numeric} scalar} \item{df}{The derivative of \code{f}. This is required for all algorithms except Nelder-Mead} \item{fdf}{A function that evaluates \code{f} and \code{df} simultaneously. This is optional, and is only useful if simultaneous evaluation is faster} \item{method}{The algorithm to use, which is one of \dQuote{\code{conjugate-fr}}, \dQuote{\code{conjugate-pr}}, \dQuote{\code{bfgs}}, \dQuote{\code{steepest-descent}} and \dQuote{\code{nm}}} \item{step.size}{This step size guides the algorithm to pick a good distance between points in its search} \item{tol}{This parameter is relevant for gradient-based methods. It controls how much the gradient should flatten out in each line search. More specifically, let \eqn{u(t) = f(x + st)} be the function restricted to the search ray. Then a point \eqn{t} is tolerable if \eqn{u'(t) < tol u'(0)}. Higher values give more lax linesearches. This parameter trades-off searching intensively in the outer loop (finding search directions) versus the inner loop (finding a good point in a particular direction)} \item{prec}{The stopping-rule precision parameter. For the derivative-based methods, a solution is good enough if the norm of the gradient is smaller than \code{prec}. For the non-derivative-based methods, a solution is good enough if the norm of successive solutions is smaller than \code{prec}} \item{state}{This stores all information relating to the progress of the optimization problem} } \details{ There are two ways to call \code{multimin}. The simple way is to merely call \code{multimin} directly. A more complicated way is to call \code{multimin.init} first, and then repeatedly call \code{multimin.iterate} until the guess gets good enough. In addition, \code{multimin.restart} can be used with the second approach to discard accumulated information (such as curvature information) if that information turns out to be unhelpful. This is roughly equivalent to calling \code{multimin.init} by setting the starting point to be the current best guess. All of the derivative-based methods consist of iterations that pick a descent direction, and conduct a line search for a better point along the ray in that direction from the current point. The Fletcher-Reeves and Polak-Ribiere conjugate gradient algorithms maintain a a vector that summarizes the curvature at that point. These are useful for high-dimensional problems (eg: more than 100 dimensions) because they don't use matrices which become expensive to keep track of. The Broyden-Fletcher-Goldfarb-Shanno is better for low-dimensional problems, since it maintains an approximation of the Hessian of the function as well, which gives better curvature information. The steepest-descent algorithm is a naive algorithm that does not use any curvature information. The Nelder-Mead algorithm which does not use derivatives. } \value{All of these functions return a state variable, which consists of the following items: \item{internal.state}{Bureaucratic stuff for communicating with \acronym{GSL}} \item{x}{The current best guess of the optimal solution} \item{f}{The value of the function at the best guess} \item{df}{The derivative of the function at the best guess} \item{is.fdf}{TRUE if the algorithm is using a derivative} \item{code}{The \acronym{GSL} return code from the last iteration} } \references{\url{http://www.gnu.org/software/gsl}} \seealso{ \code{optim} and \code{nlm} are the standard optimization functions in R. \code{deriv} and \code{D} are the standard symbolic differentation functions in R. \code{Ryacas} provides more extensive differentiation support using Yet Another Computer Algebra System. \code{numericDeriv} is the standard numerical differentation function in R. \acronym{GSL} can also do numerical differentiation, but no-one has written an R interface yet. \code{multimin} requires the objective function to have a single (vector) argument. \code{unlist} and \code{relist} are useful for converting between more convenient forms. } \author{Andrew Clausen \email{clausen@econ.upenn.edu}} \note{The source code for the functions documented here conditionalizes on \code{WIN32}; under windows there is a slight memory leak.} \examples{ # The Rosenbrock function: \donttest{ x0 <- c(-1.2, 1) f <- function(x) (1 - x[1])^2 + 100 * (x[2] - x[1]^2)^2 df <- function(x) c(-2*(1 - x[1]) + 100 * 2 * (x[2] - x[1]^2) * (-2*x[1]), 100 * 2 * (x[2] - x[1]^2)) # The simple way to call multimin. state <- multimin(x0, f, df) print(state$x) # The fine-control way to call multimin. state <- multimin.init(x0, f, df, method="conjugate-fr") for (i in 1:200) state <- multimin.iterate(state) print(state$x) } } \keyword{array} gsl/man/Rng.Rd0000644000176200001440000000413413443526307012640 0ustar liggesusers\name{Rng} \alias{Rng} \alias{rng} \alias{rng_alloc} \alias{rng_clone} \alias{rng_max} \alias{rng_min} \alias{rng_name} \alias{rng_set} \alias{rng_get} \alias{rng_uniform} \alias{rng_uniform_int} \alias{rng_uniform_pos} \title{Random numbers generation} \description{Random number generation with the Gnu Scientific Library, as per the reference manual section 17} \usage{ rng_alloc(type) rng_clone(r) rng_name(r) rng_max(r) rng_min(r) rng_set(r, seed) rng_get(r, length) rng_uniform(r, length) rng_uniform_int(r, N, length) rng_uniform_pos(r, length) } \arguments{ \item{type}{In function \code{rng_alloc()}, type of random number generator. This argument is taken to be a character string which is matched to the names of the random number generators given in the \acronym{GSL} manual section 17.9, with the initial \dQuote{\code{gsl_rng_}} removed (for example, to use generator \code{gsl_rng_ranlux}, set \code{type} to \code{ranlux}). Partial matching is used; a null string is interpreted as \code{mt19937}.} \item{r}{Instance of a random number generator. Generate this using function \code{rng_alloc()}.} \item{seed}{Random number seed} \item{length}{Length of vector of random numbers to create} \item{N}{In function \code{rng_uniform_int()}, upper bound of uniform distribution} } \details{ These are wrappers for the random number generator functions from the \acronym{GSL} \url{http://www.gnu.org/software/gsl} with arguments corresponding to those from the library. Calling \code{rng_free} is not necessary as R performs garbage collection automatically. The functions that return random numbers (\code{rng_get}, \code{rng_uniform}, \code{rng_uniform_int}, \code{rng_uniform_pos}) take an extra argument that specifies the length of the vector of random numbers to be returned. } \value{ Function \code{rng_alloc()} returns an external pointer to a \acronym{GSL} random number generator. } \references{\url{http://www.gnu.org/software/gsl}} \author{Max Bruche} \examples{ r <- rng_alloc("cmrg") rng_set(r, 100) rng_uniform(r, 10) } \keyword{datagen} \keyword{distribution} gsl/man/Laguerre.Rd0000644000176200001440000000232013443526307013653 0ustar liggesusers\name{Laguerre} \alias{Laguerre} \alias{laguerre} \alias{laguerre_1} \alias{laguerre_2} \alias{laguerre_3} \alias{laguerre_n} \title{Laguerre functions} \description{ Laguerre functions as per the Gnu Scientific Library reference manual section 7.22. These functions are declared in header file \code{gsl_sf_laguerre.h} } \usage{ laguerre_1(a, x, give=FALSE, strict=TRUE) laguerre_2(a, x, give=FALSE, strict=TRUE) laguerre_3(a, x, give=FALSE, strict=TRUE) laguerre_n(n, a, x, give=FALSE, strict=TRUE) } \arguments{ \item{a,x}{input: real values} \item{n}{input: integer values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error}} \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=6,len=100) plot(x,laguerre_n(2,0,x),xlim=c(0,6),ylim=c(-2,3), type="l",xaxt="n",yaxt="n",bty="n",xlab="",ylab="", main="Figure 22.9, p780") lines(x,laguerre_n(3,0,x)) lines(x,laguerre_n(4,0,x)) lines(x,laguerre_n(5,0,x)) axis(1,pos=0) axis(2,pos=0) } \keyword{array} gsl/man/gsl-package.Rd0000644000176200001440000000406413443526307014272 0ustar liggesusers\name{gsl-package} \alias{gsl-package} \alias{gsl} \alias{GSL} \docType{package} \title{ Wrappers for the Gnu Scientific Library } \description{ \packageDescription{gsl} } \details{ The DESCRIPTION file: \packageDESCRIPTION{gsl} \packageIndices{gsl} The function naming scheme directly copies the \acronym{GSL} manual except that leading \code{gsl_sf_} and, if present, the trailing \code{_e} is stripped: thus \code{gsl_sf_Airy_Ai_e} goes to \R function \code{airy_Ai()}; however, some functions retain the prefix to avoid conflicts (viz \code{gsl_sf_sin()}, \code{gsl_sf_cos()}, \code{gsl_sf_gamma()}, \code{gsl_sf_ choose()}, \code{gsl_sf_beta()}). \R\ function arguments have the same names as in the \acronym{GSL} reference manual, except for the quasirandom functions documented in the \code{Qrng} manpage. The package is organized into units corresponding to \acronym{GSL} header files; the \code{.c}, \code{.R}, and \code{.Rd} filenames match the \acronym{GSL} header filenames, except that the \code{.Rd} files are capitalized. Functions appear in all files in the same order as the \acronym{GSL} reference manual, which precludes the use of the tidying method given in section 3.1 of R-exts. Error forms of \acronym{GSL} functions (\code{_e} versions) are used if available. In general, documentation is limited to: (a), a pointer to the \acronym{GSL} reference book, which would in any case dominate any docs here; and (b), re-productions of some tables and figures in Abramowitz and Stegun (June 1964). } \author{ \packageAuthor{gsl} Maintainer: \packageMaintainer{gsl} } \references{ \itemize{ \item M. Abramowitz and I. A. Stegun 1965. \emph{Handbook of mathematical functions}. New York: Dover \item M. Galassi et al. 2007. \emph{GNU Scientific Library}. Reference Manual edition 1.10, for \acronym{GSL} version 1.10; 10 September 2007 \item R. K. S. Hankin 2006. \emph{Introducing gsl, a wrapper for the Gnu Scientific Library}. Rnews 6(4):24-26 } } \keyword{ package } \examples{ airy_Ai(1:5) } gsl/man/Trig.Rd0000644000176200001440000000367113443526307013024 0ustar liggesusers\name{Trig} \alias{Trig} \alias{trig} \alias{gsl_sf_sin} \alias{gsl_sf_cos} \alias{hypot} \alias{sinc} \alias{complex_sin} \alias{complex_cos} \alias{complex_logsin} \alias{lnsinh} \alias{lncosh} \title{Trig functions} \description{ Trig functions as per the Gnu Scientific Library, reference manual section 7.30. These functions are declared in header file \code{gsl_sf_trig.h} } \usage{ gsl_sf_sin(x, give=FALSE, strict=TRUE) gsl_sf_cos(x, give=FALSE, strict=TRUE) hypot(x, y, give=FALSE, strict=TRUE) sinc(x, give=FALSE, strict=TRUE) complex_sin(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE) complex_cos(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE) lnsinh(x, give=FALSE, strict=TRUE) lncosh(x, give=FALSE, strict=TRUE) } \arguments{ \item{x,y}{input: real values} \item{zr}{In \code{gamma_complex()}, the real part of the argument} \item{zi}{In \code{complex_sin()} et seq, the imaginary part of the argument. If missing (ie takes the default value of \code{NULL}), interpret \code{zr} as complex, even if real} \item{r.and.i}{In \code{complex_sin()} et seq, Boolean variable with default value of \code{TRUE} meaning to return a complex variable as per the details section below; and \code{FALSE} meaning to return the values as advertised in the \acronym{GSL} manual} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=2,by=0.01) gsl_sf_sin(x) #table xx of Ab and St gsl_sf_cos(x) #table xx of Ab and St f <- function(x){abs(sin(x+1)-sin(x)*cos(1)-cos(x)*sin(1))} g <- function(x){abs(gsl_sf_sin(x+1)-gsl_sf_sin(x)*gsl_sf_cos(1)-gsl_sf_cos(x)*gsl_sf_sin(1))} f(100000:100010) g(100000:100010) } \keyword{array} gsl/man/Hyperg.Rd0000644000176200001440000000337513443526307013356 0ustar liggesusers\name{Hyperg} \alias{Hyperg} \alias{hyperg} \alias{hyperg_0F1} \alias{hyperg_1F1_int} \alias{hyperg_1F1} \alias{hyperg_U_int} \alias{hyperg_U} \alias{hyperg_2F1} \alias{hyperg_2F1_conj} \alias{hyperg_2F1_renorm} \alias{hyperg_2F1_conj_renorm} \alias{hyperg_2F0} \title{Hypergeometric functions} \description{ Hypergeometric functions as per the Gnu Scientific Library reference manual section 7.21 and AMS-55, chapters 13 and 15. These functions are declared in header file \code{gsl_sf_hyperg.h} } \usage{ hyperg_0F1(c, x, give=FALSE, strict=TRUE) hyperg_1F1_int(m, n, x, give=FALSE, strict=TRUE) hyperg_1F1(a, b, x, give=FALSE, strict=TRUE) hyperg_U_int(m, n, x, give=FALSE, strict=TRUE) hyperg_U(a, b, x, give=FALSE, strict=TRUE) hyperg_2F1(a, b, c, x, give=FALSE, strict=TRUE) hyperg_2F1_conj(aR, aI, c, x, give=FALSE, strict=TRUE) hyperg_2F1_renorm(a, b, c, x, give=FALSE, strict=TRUE) hyperg_2F1_conj_renorm(aR, aI, c, x, give=FALSE, strict=TRUE) hyperg_2F0(a, b, x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{a,b,c}{input: real values} \item{m,n}{input: integer values} \item{aR,aI}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number.} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \note{ \dQuote{The circle of convergence of the Gauss hypergeometric series is the unit circle \eqn{|z|=1}{|z|=1}} (AMS, page 556). } \examples{ hyperg_0F1(0.1,0.55) hyperg_1F1_int(2,3,0.555) hyperg_1F1(2.12312,3.12313,0.555) hyperg_U_int(2, 3, 0.555) hyperg_U(2.234, 3.234, 0.555) } \keyword{array} gsl/man/Coulomb.Rd0000644000176200001440000000603213443526307013511 0ustar liggesusers\name{Coulomb} \alias{Coulomb} \alias{coulomb} \alias{hydrogenicR_1} \alias{hydrogenicR} \alias{coulomb_wave_FG} \alias{coulomb_wave_F_array} \alias{coulomb_wave_FG_array} \alias{coulomb_wave_FGp_array} \alias{coulomb_wave_sphF_array} \alias{coulomb_CL} \alias{coulomb_CL_array} \title{Coulomb functions} \description{ Coulomb functions as per the Gnu Scientific Library, reference manual section 7.7 and AMS-55, chapter 14. These functions are declared in header file \code{gsl_sf_coulomb.h} } \usage{ hydrogenicR_1(Z, r, give=FALSE, strict=TRUE) hydrogenicR(n, l, Z, r, give=FALSE, strict=TRUE) coulomb_wave_FG(eta, x, L_F, k, give=FALSE, strict=TRUE) coulomb_wave_F_array(L_min, kmax, eta, x, give=FALSE,strict=TRUE) coulomb_wave_FG_array(L_min, kmax, eta, x, give=FALSE,strict=TRUE) coulomb_wave_FGp_array(L_min, kmax, eta, x, give=FALSE,strict=TRUE) coulomb_wave_sphF_array(L_min, kmax, eta, x, give=FALSE,strict=TRUE) coulomb_CL(L,eta, give=FALSE,strict=TRUE) coulomb_CL_array(L_min, kmax, eta, give=FALSE,strict=TRUE) } \arguments{ \item{n,l,kmax}{input: integers} \item{Z,r,eta,x,L_F,L_min,k,L}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=14,len=300) jj <- coulomb_wave_FG(1,10,x,0) plot(x,jj$val_F,type="l",xaxt="n",yaxt="n",bty="n",xlab="",ylab="", main="Figure 14.1, p539") lines(x,jj$val_G,type="l",lty=2) axis(1,pos=0,at=1:14, labels=c("","2","","4","","6","","8","","10","","12","","14")) lines(c(0,1),c(0,0)) axis(2,pos=0) text(9.5, 0.63, expression(F[L])) text(8.5, 1.21, expression(G[L])) x <- seq(from=0,to=24,len=400) plot(x,coulomb_wave_FG(eta=1,x,L_F=0,k=0)$val_F,type="l", ylim=c(-1.3,1.7), xlim=c(0,26), xaxt="n",yaxt="n",bty="n",xlab="",ylab="",main="Figure 14.3, p541",lty=3) lines(x,coulomb_wave_FG(eta= 0,x,L_F=0,k=0)$val_F,type="l",lty=1) lines(x,coulomb_wave_FG(eta= 5,x,L_F=0,k=0)$val_F,type="l",lty=6) lines(x,coulomb_wave_FG(eta=10,x,L_F=0,k=0)$val_F,type="l",lty=6) lines(x,coulomb_wave_FG(eta=x/2,x,L_F=0,k=0)$val_F,type="l",lty="F3") axis(1,pos=0,at=1:24, labels=c("","2","","4","","","","8","","10","","12", "","14","","","","18","","","","22","","24")) lines(c(0,26),c(0,0)) axis(2,pos=0,at=0.2*(-6:9), labels=c("","-1.2","","-.8","","-.4","","0","",".4", "",".8","","1.2","","1.6")) text(2.5, -0.8, expression(eta == 0)) text(4.5,1.1,adj=0, expression(eta == 1)) text(14,1.4,adj=0, expression(eta == 5)) text(22,1.4,adj=0, expression(eta == 10)) x <- seq(from=0.5,to=10,by=0.5) jj <- coulomb_wave_FG(eta=t(matrix(x,20,5)), x=1:5,0,0) jj.F <- t(jj$val_F) jj.G <- t(jj$val_G) colnames(jj.F) <- 1:5 colnames(jj.G) <- 1:5 cbind(x,jj.F) #table 14.1, p 546, top bit. cbind(x,jj.G) #table 14.1, p 547, top bit. } \keyword{array} gsl/man/Airy.Rd0000644000176200001440000000535213443526307013021 0ustar liggesusers\name{Airy} \alias{Airy} \alias{airy} \alias{airy_Ai} \alias{airy_Bi} \alias{airy_Bi_e} \alias{airy_Ai_scaled} \alias{airy_Ai_scaled_e} \alias{airy_Bi_scaled} \alias{airy_Bi_scaled_e} \alias{airy_Ai_deriv} \alias{airy_Ai_deriv_e} \alias{airy_Bi_deriv} \alias{airy_Bi_deriv_e} \alias{airy_Ai_deriv_scaled} \alias{airy_Ai_deriv_scaled_e} \alias{airy_Bi_deriv_scaled} \alias{airy_Bi_deriv_scaled_e} \alias{airy_zero_Ai} \alias{airy_zero_Ai_e} \alias{airy_zero_Bi} \alias{airy_zero_Bi_e} \alias{airy_zero_Ai_deriv} \alias{airy_zero_Ai_deriv_e} \alias{airy_zero_Bi_deriv} \alias{airy_zero_Bi_deriv_e} \title{Airy functions} \description{ Airy functions as per the Gnu Scientific Library, reference manual section 7.4 and AMS-55, section 10.4. These functions are declared in header file \code{gsl_sf_airy.h} } \usage{ airy_Ai(x, mode=0, give=FALSE, strict=TRUE) airy_Ai_scaled(x, mode=0, give=FALSE, strict=TRUE) airy_Ai(x, mode=0, give=FALSE, strict=TRUE) airy_Bi_scaled(x, mode=0, give=FALSE, strict=TRUE) airy_Ai_deriv(x, mode=0, give=FALSE, strict=TRUE) airy_Bi_deriv(x, mode=0, give=FALSE, strict=TRUE) airy_Ai_deriv_scaled(x, mode=0, give=FALSE, strict=TRUE) airy_Bi_deriv_scaled(x, mode=0, give=FALSE, strict=TRUE) airy_zero_Ai(n, give=FALSE, strict=TRUE) airy_zero_Bi(n, give=FALSE, strict=TRUE) airy_zero_Ai_deriv(n, give=FALSE, strict=TRUE) airy_zero_Bi_deriv(n, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{n}{input: integer values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{mode}{input: mode. For \code{GSL_PREC_DOUBLE}, \code{GSL_PREC_SINGLE}, \code{GSL_PREC_APPROX} use \code{0,1,2} respectively} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \details{ The zero functions return a status of \code{GSL_EDOM} and a value of \code{NA} for \eqn{n\leq 0}{n <= 0}. An example is given in the package vignette. } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=1,by=0.01) f <- function(x){ cbind(x=x, Ai= airy_Ai(x), Aidash= airy_Ai_deriv(x), Bi=airy_Ai(x),Bidash=airy_Bi_deriv(x)) } f(x) #table 10.11, p475 f(-x) #table 10.11, p476 x <- 1:10 #table 10.13, p478 cbind(x, airy_zero_Ai(x), airy_Ai_deriv(airy_zero_Ai(x)), airy_zero_Ai_deriv(x), airy_Ai(airy_zero_Ai_deriv(x)), airy_zero_Bi(x), airy_Bi_deriv(airy_zero_Bi(x)), airy_zero_Bi_deriv(x), airy_Bi(airy_zero_Bi_deriv(x)) ) # Verify 10.4.4 and 10.4.5, p446: 3^(-2/3)/gamma(2/3) - airy_Ai(0) 3^(-1/3) / gamma(1/3) + airy_Ai_deriv(0) 3^(-1/6) / gamma(2/3) - airy_Bi(0) 3^(1/6) / gamma(1/3) - airy_Bi_deriv(0) # All should be small } gsl/man/Ellint.Rd0000644000176200001440000000476113443526307013347 0ustar liggesusers\name{Ellint} \alias{Ellint} \alias{ellint} \alias{ellint_Kcomp} \alias{ellint_Ecomp} \alias{ellint_F} \alias{ellint_E} \alias{ellint_P} \alias{ellint_D} \alias{ellint_RC} \alias{ellint_RD} \alias{ellint_RF} \alias{ellint_RJ} \title{Elliptic functions} \description{ Elliptic functions as per the Gnu Scientific Library, reference manual section 7.13 and AMS-55, chapter 17. These functions are declared in header file \code{gsl_sf_ellint.h} } \usage{ ellint_Kcomp(k, mode=0, give=FALSE,strict=TRUE) ellint_Ecomp(k, mode=0, give=FALSE,strict=TRUE) ellint_F(phi,k, mode=0, give=FALSE,strict=TRUE) ellint_E(phi,k, mode=0, give=FALSE,strict=TRUE) ellint_P(phi,k,n, mode=0, give=FALSE,strict=TRUE) ellint_D(phi,k, mode=0, give=FALSE,strict=TRUE) ellint_RC(x, y, mode=0, give=FALSE,strict=TRUE) ellint_RD(x, y, z, mode=0, give=FALSE,strict=TRUE) ellint_RF(x, y, z, mode=0, give=FALSE,strict=TRUE) ellint_RJ(x, y, z, p, mode=0, give=FALSE,strict=TRUE) } \arguments{ \item{phi,k,n,p,x,y,z}{input: real values} \item{give}{Boolean, with default \code{FALSE} meaning to return just the answers, and \code{TRUE} meaning to return a status vector as well} \item{strict}{Boolean} \item{mode}{input: mode. For \code{GSL_PREC_DOUBLE}, \code{GSL_PREC_SINGLE}, \code{GSL_PREC_APPROX} use \code{0,1,2} respectively.} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ ellint_Kcomp(0.3) ellint_Ecomp(0.3) ellint_F(0.4,0.7) ellint_E(0.4,0.7) ellint_P(0.4,0.7,0.3) ellint_D(0.4,0.3) ellint_RC(0.5,0.6) ellint_RD(0.5,0.6,0.7) ellint_RF(0.5,0.6,0.7) ellint_RJ(0.5,0.6,0.7,0.1) x <- seq(from=0,to=0.5,by=0.01) col1 <- ellint_Kcomp(sqrt(x)) col2 <- ellint_Kcomp(sqrt(1-x)) col3 <- exp(-pi*col2/col1) cbind(x,col1,col2,col3) #table 17.1, p608 x <- 0:45 col1 <- ellint_Kcomp(sin(pi/180*x)) col2 <- ellint_Kcomp(sin(pi/2-pi/180*x)) col3 <- exp(-pi*col2/col1) cbind(x,col1,col2,col3) #table 17.2, p610 x <- seq(from=0,to=90,by=2) f <- function(a){ellint_F(phi=a*pi/180,sin(x*pi/180))} g <- function(a){ellint_E(phi=a*pi/180,sin(x*pi/180))} h <- function(a,n){ellint_P(phi=a*pi/180,sin( a*15*pi/180),n)} i <- function(x){ellint_P(phi=x*pi/180, k=sin((0:6)*15*pi/180), n= -0.6)} cbind(x,f(5),f(10),f(15),f(20),f(25),f(30)) #table 17.5, p613 cbind(x,g(5),g(10),g(15),g(20),g(25),g(30)) #table 17.6, p616 cbind(i(15),i(30),i(45),i(60),i(75),i(90)) #table 17.9, #(BOTTOM OF p625) } \keyword{array} gsl/man/Dawson.Rd0000644000176200001440000000135313443526307013345 0ustar liggesusers\name{Dawson} \alias{Dawson} \alias{dawson} \title{Dawson functions} \description{ Dawson functions as per the Gnu Scientific Library, reference manual section 7.9. These functions are declared in header file \code{gsl_sf_dawson.h} } \usage{ dawson(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=2,by=0.01) dawson(x) #table 7.5 of Ab and St } \keyword{array} gsl/man/Coupling.Rd0000644000176200001440000000226213443526307013672 0ustar liggesusers\name{Coupling} \alias{Coupling} \alias{coupling} \alias{coupling_3j} \alias{coupling_6j} \alias{coupling_9j} \title{Coupling functions} \description{ Coupling functions as per the Gnu Scientific Library, reference manual section 7.8. These functions are declared in header file \code{gsl_sf_coupling.h} } \usage{ coupling_3j(two_ja, two_jb, two_jc, two_ma, two_mb, two_mc, give=FALSE, strict=TRUE) coupling_6j(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, give=FALSE, strict=TRUE) coupling_9j(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, two_jg, two_jh, two_ji, give=FALSE, strict=TRUE) } \arguments{ \item{two_ja, two_jb, two_jc, two_jd, two_je, two_jf, two_jg, two_jh, two_ji, two_ma, two_mb, two_mc}{Arguments as per the \acronym{GSL} manual} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ coupling_3j(1,2,3,4,5,6) coupling_6j(1,2,3,4,5,6) coupling_9j(1,2,3,4,5,6,7,8,9) } \keyword{array} gsl/man/Legendre.Rd0000644000176200001440000001006613443526307013640 0ustar liggesusers\name{Legendre} \alias{Legendre} \alias{legendre} \alias{legendre_P1} \alias{legendre_P2} \alias{legendre_P3} \alias{legendre_Pl} \alias{legendre_Pl_array} \alias{legendre_Q0} \alias{legendre_Q1} \alias{legendre_Ql} \alias{legendre_array_n} \alias{legendre_array_index} \alias{legendre_check_args} \alias{legendre_array} \alias{legendre_deriv_array} \alias{legendre_deriv_alt_array} \alias{legendre_deriv2_array} \alias{legendre_deriv2_alt_array} \alias{legendre_Plm} \alias{legendre_sphPlm} \alias{conicalP_half} \alias{conicalP_mhalf} \alias{conicalP_0} \alias{conicalP_1} \alias{conicalP_sph_reg} \alias{conicalP_cyl_reg} \alias{legendre_H3d_0} \alias{legendre_H3d_1} \alias{legendre_H3d} \alias{legendre_H3d_array} \alias{conical} \alias{Conical} \title{Legendre functions} \description{ Legendre functions as per the Gnu Scientific Library reference manual section 7.24, and AMS-55, chapter 8. These functions are declared in header file \code{gsl_sf_legendre.h} } \usage{ legendre_P1(x, give=FALSE, strict=TRUE) legendre_P2(x, give=FALSE, strict=TRUE) legendre_P3(x, give=FALSE, strict=TRUE) legendre_Pl(l, x, give=FALSE, strict=TRUE) legendre_Pl_array(lmax, x, give=FALSE, strict=TRUE) legendre_Q0(x, give=FALSE, strict=TRUE) legendre_Q1(x, give=FALSE, strict=TRUE) legendre_Ql(l, x, give=FALSE, strict=TRUE) legendre_array_n(lmax) legendre_array_index(l,m) legendre_check_args(x,lmax,norm,csphase) legendre_array(x, lmax, norm=1, csphase= -1) legendre_deriv_array(x, lmax, norm=1, csphase= -1) legendre_deriv_alt_array(x, lmax, norm=1, csphase= -1) legendre_deriv2_array(x, lmax, norm=1, csphase= -1) legendre_deriv2_alt_array(x, lmax, norm=1, csphase= -1) legendre_Plm(l, m, x, give=FALSE, strict=TRUE) legendre_sphPlm(l, m, x, give=FALSE, strict=TRUE) conicalP_half(lambda, x, give=FALSE, strict=TRUE) conicalP_mhalf(lambda, x, give=FALSE, strict=TRUE) conicalP_0(lambda, x, give=FALSE, strict=TRUE) conicalP_1(lambda, x, give=FALSE, strict=TRUE) conicalP_sph_reg(l, lambda, x, give=FALSE, strict=TRUE) conicalP_cyl_reg(m, lambda, x, give=FALSE, strict=TRUE) legendre_H3d_0(lambda, eta, give=FALSE, strict=TRUE) legendre_H3d_1(lambda, eta, give=FALSE, strict=TRUE) legendre_H3d(l, lambda, eta, give=FALSE, strict=TRUE) legendre_H3d_array(lmax, lambda, eta, give=FALSE, strict=TRUE) } \arguments{ \item{eta,lambda,x}{input: real values} \item{l,m,lmax}{input: integer values} \item{csphase,norm}{Options for use with \code{legendre_array()}} \item{give}{Boolean, with default \code{FALSE} meaning to return just the answers, and \code{TRUE} meaning to return a status vector as well} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if nonzero status is returned by the \acronym{GSL} function (\code{FALSE} means to return the value: use with caution)} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ theta <- seq(from=0,to=pi/2,len=100) plot(theta,legendre_P1(cos(theta)),type="l",ylim=c(-0.5,1), main="Figure 8.1, p338") abline(1,0) lines(theta,legendre_P2(cos(theta)),type="l") lines(theta,legendre_P3(cos(theta)),type="l") x <- seq(from=0,to=1,len=600) plot(x, legendre_Plm(3,1,x), type="l",lty=3,main="Figure 8.2, p338: note sign error") lines(x,legendre_Plm(2,1,x), type="l",lty=2) lines(x,legendre_Plm(1,1,x), type="l",lty=1) abline(0,0) plot(x,legendre_Ql(0,x),xlim=c(0,1), ylim=c(-1,1.5), type="l",lty=1, main="Figure 8.4, p339") lines(x,legendre_Ql(1,x),lty=2) lines(x,legendre_Ql(2,x),lty=3) lines(x,legendre_Ql(3,x),lty=4) abline(0,0) #table 8.1 of A&S: t(legendre_Pl_array(10, seq(from=0,to=1,by=0.01))[1+c(2,3,9,10),]) #table 8.3: f <- function(n){legendre_Ql(n, seq(from=0,to=1,by=0.01))} sapply(c(0,1,2,3,9,10),f) # Some checks for the legendre_array() series: # P_6^1(0.3): legendre_array(0.3,7)[7,2] # MMA: LegendreP[6,1,0.3]; note off-by-one issue # d/dx P_8^5(x) @ x=0.2: legendre_deriv_array(0.2,8)[9,6] # MMA: D[LegendreP[8,5,x],x] /. {x -> 0.2} # alternative derivatives: legendre_deriv_alt_array(0.4,8)[9,6] # D[LegendreP[8,5,Cos[x]],x] /. x -> ArcCos[0.4] } \keyword{array} gsl/man/Bessel.Rd0000644000176200001440000001657213443526307013340 0ustar liggesusers\name{Bessel} \alias{Bessel} \alias{bessel} \alias{bessel_J0} \alias{bessel_J1} \alias{bessel_Jn} \alias{bessel_Jn_array} \alias{bessel_Y0} \alias{bessel_Y1} \alias{bessel_Yn} \alias{bessel_Yn_array} \alias{bessel_I0} \alias{bessel_I1} \alias{bessel_In} \alias{bessel_In_array} \alias{bessel_I0_scaled} \alias{bessel_I1_scaled} \alias{bessel_In_scaled} \alias{bessel_In_scaled_array} \alias{bessel_K0} \alias{bessel_K1} \alias{bessel_Kn} \alias{bessel_Kn_array} \alias{bessel_K0_scaled} \alias{bessel_K1_scaled} \alias{bessel_Kn_scaled} \alias{bessel_Kn_scaled_array} \alias{bessel_j0} \alias{bessel_j1} \alias{bessel_j2} \alias{bessel_jl} \alias{bessel_jl_array} \alias{bessel_jl_steed_array} \alias{bessel_y0} \alias{bessel_y1} \alias{bessel_y2} \alias{bessel_yl} \alias{bessel_yl_array} \alias{bessel_i0_scaled} \alias{bessel_i1_scaled} \alias{bessel_i2_scaled} \alias{bessel_il_scaled} \alias{bessel_il_scaled_array} \alias{bessel_k0_scaled} \alias{bessel_k1_scaled} \alias{bessel_k2_scaled} \alias{bessel_kl_scaled} \alias{bessel_kl_scaled_array} \alias{bessel_Jnu} \alias{bessel_sequence_Jnu} \alias{bessel_Ynu} \alias{bessel_Inu} \alias{bessel_Inu_scaled} \alias{bessel_Knu} \alias{bessel_lnKnu} \alias{bessel_Knu_scaled} \alias{bessel_zero_J0} \alias{bessel_zero_J1} \alias{bessel_zero_Jnu} \title{Bessel functions} \description{ Bessel functions as per the Gnu Scientific Library, reference manual section 7.5 and AMS-55, chapters 9 and 10. These functions are declared in header file \code{gsl_sf_bessel.h} } \usage{ bessel_J0(x, give=FALSE, strict=TRUE) bessel_J1(x, give=FALSE, strict=TRUE) bessel_Jn(n,x, give=FALSE, strict=TRUE) bessel_Jn_array(nmin,nmax,x, give=FALSE, strict=TRUE) bessel_Y0(x, give=FALSE, strict=TRUE) bessel_Y1(x, give=FALSE, strict=TRUE) bessel_Yn(n,x, give=FALSE, strict=TRUE) bessel_Yn_array(nmin, nmax, x, give=FALSE, strict=TRUE) bessel_I0(x, give=FALSE, strict=TRUE) bessel_I1(x, give=FALSE, strict=TRUE) bessel_In(n, x, give=FALSE, strict=TRUE) bessel_In_array(nmin, nmax, x, give=FALSE, strict=TRUE) bessel_I0_scaled(x, give=FALSE, strict=TRUE) bessel_I1_scaled(x, give=FALSE, strict=TRUE) bessel_In_scaled(n, x, give=FALSE, strict=TRUE) bessel_In_scaled_array(nmin, nmax, x, give=FALSE, strict=TRUE) bessel_K0(x, give=FALSE, strict=TRUE) bessel_K1(x, give=FALSE, strict=TRUE) bessel_Kn(n, x, give=FALSE, strict=TRUE) bessel_Kn_array(nmin, nmax, x, give=FALSE, strict=TRUE) bessel_K0_scaled(x, give=FALSE, strict=TRUE) bessel_K1_scaled(x, give=FALSE, strict=TRUE) bessel_Kn_scaled(n, x, give=FALSE, strict=TRUE) bessel_Kn_scaled_array(nmin, nmax, x, give=FALSE, strict=TRUE) bessel_j0(x, give=FALSE, strict=TRUE) bessel_j1(x, give=FALSE, strict=TRUE) bessel_j2(x, give=FALSE, strict=TRUE) bessel_jl(l,x, give=FALSE, strict=TRUE) bessel_jl_array(lmax,x, give=FALSE, strict=TRUE) bessel_jl_steed_array(lmax, x, give=FALSE, strict=TRUE) bessel_y0(x, give=FALSE, strict=TRUE) bessel_y1(x, give=FALSE, strict=TRUE) bessel_y2(x, give=FALSE, strict=TRUE) bessel_yl(l, x, give=FALSE, strict=TRUE) bessel_yl_array(lmax, x, give=FALSE, strict=TRUE) bessel_i0_scaled(x, give=FALSE, strict=TRUE) bessel_i1_scaled(x, give=FALSE, strict=TRUE) bessel_i2_scaled(x, give=FALSE, strict=TRUE) bessel_il_scaled(l, x, give=FALSE, strict=TRUE) bessel_il_scaled_array(lmax, x, give=FALSE, strict=TRUE) bessel_k0_scaled(x, give=FALSE, strict=TRUE) bessel_k1_scaled(x, give=FALSE, strict=TRUE) bessel_k2_scaled(x, give=FALSE, strict=TRUE) bessel_kl_scaled(l,x, give=FALSE, strict=TRUE) bessel_kl_scaled_array(lmax,x, give=FALSE, strict=TRUE) bessel_Jnu(nu, x, give=FALSE, strict=TRUE) bessel_sequence_Jnu(nu, v, mode=0, give=FALSE, strict=TRUE) bessel_Ynu(nu, x, give=FALSE, strict=TRUE) bessel_Inu(nu, x, give=FALSE, strict=TRUE) bessel_Inu_scaled(nu, x, give=FALSE, strict=TRUE) bessel_Knu(nu, x, give=FALSE, strict=TRUE) bessel_lnKnu(nu, x, give=FALSE, strict=TRUE) bessel_Knu_scaled(nu, x, give=FALSE, strict=TRUE) bessel_zero_J0(s, give=FALSE, strict=TRUE) bessel_zero_J1(s, give=FALSE, strict=TRUE) bessel_zero_Jnu(nu, s, give=FALSE, strict=TRUE) } \arguments{ \item{x,v,nu}{input: real valued} \item{n,nmin,nmax,lmax}{input: integer valued} \item{l,s}{input: integer valued} \item{mode}{Integer, calc mode} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{strict or not} } \details{All as for the \acronym{GSL} reference manual section 7.5 } \author{Robin K. S. Hankin} \references{\url{http://www.gnu.org/software/gsl}} \examples{ # Compare native R routine with GSL: besselK(0.55,4) - bessel_Knu(4,0.55) # should be small x <- seq(from=0,to=15,len=1000) plot(x,bessel_J0(x),xlim=c(0,16),ylim=c(-0.8,1.1),type="l", xaxt="n",yaxt="n",bty="n",xlab="",ylab="", main="Figure 9.1, p359") jj.Y0 <- bessel_Y0(x) jj.Y0[jj.Y0< -0.8] <- NA lines(x,jj.Y0) lines(x,bessel_J1(x),lty=2) jj.Y1 <- bessel_Y1(x) jj.Y1[jj.Y1< -0.8] <- NA lines(x,jj.Y1,lty=2) axis(1,pos=0,at=1:15, labels=c("","2","","4","","6","","8","","10","","12","","14","") ) axis(2,pos=0,at=seq(from=-8,to=10,by=2)/10, labels=c("-.8","-.6","-.4","-.2","0",".2",".4",".6",".8","1.0")) arrows(0,0,16,0,length=0.1,angle=10) arrows(0,0,0,1.1,length=0.1,angle=10) text(1.1, 0.83, expression(J[0])) text(0.37, 0.3, expression(J[1])) text(0.34,-0.3, expression(Y[0])) text(1.7,-0.5, expression(Y[1])) text(4.2, 0.43, expression(Y[1])) text(7.2, 0.33, expression(J[0])) text(8.6, 0.3, expression(J[0],paste(" ,"))) text(9.1, 0.3, expression(Y[0])) x <- seq(from=0,to=13,len=100) y <- t(bessel_jl_array(3,x)) y[y>0.6] <- NA matplot(x,y,col="black",type="l",xaxt="n",yaxt="n",bty="n", xlab="",ylab="",xlim=c(0,16),ylim=c(-0.3,0.75), main="Figure 10.1, p438") axis(1,pos=0,at=2*(1:7)) arrows(0,0,15,0,length=0.1,angle=10) arrows(0,0,0,0.65,length=0.1,angle=10) axis(2,pos=0,las=1,at=seq(from=-3,to=6)/10, labels=c("-.3","-.2","-.1","0",".1",".2",".3",".4",".5",".6")) text(0, 0.7, expression(J[n](x))) text(15.5, 0, expression(x)) text(2.2,0.58,expression(n==0)) text(3.2,0.4,expression(n==1)) text(4.3,0.3,expression(n==2)) text(6.0,0.22,expression(n==3)) x <- seq(from=0 ,to=5,by=0.1) cbind(x, bessel_J0(x),bessel_J1(x),bessel_Jn(2,x)) #table 9.1, p390 cbind(x, bessel_Y0(x),bessel_Y1(x),bessel_Yn(2,x)) #table 9.2, p391 t(bessel_Jn_array(3,9,x*2)) #table 9.2, p398 x <- seq(from=8,to=10,by=0.2) jj <- t(bessel_Jn(n=3:9,x=t(matrix(x,11,7)))) colnames(jj) <- paste("J",3:9,"(x)",sep="") cbind(x,jj) #another part of table 9.2, p398 x <- seq(from=8,to=10,by=0.2) jj <- t(bessel_Yn(n=3:9,x=t(matrix(x,11,7)))) colnames(jj) <- paste("J",3:9,"(x)",sep="") cbind(x,jj) #part of table 9.2, p399 cbind( x, #table 9.8, p416 exp(-x)*bessel_I0 (x), exp(-x)*bessel_I1 (x), x^(-2)*bessel_In(2,x) ) cbind( x, #table 9.8, p417 exp(x)*bessel_K0 (x), exp(x)*bessel_K1 (x), x^(2)*bessel_Kn(2,x) ) cbind(x, #table 10.1 , p457 bessel_j0(x), bessel_j1(x), bessel_j2(x), bessel_y0(x), bessel_y1(x), bessel_y2(x) ) cbind(0:9,"x=1"=bessel_yl(l=0:9,x=1), "x=2"=bessel_yl(l=0:9,x=2), "x=5"=bessel_yl(l=0:9,x=5)) #table 10.5, p466, top } \keyword{array} gsl/man/Psi.Rd0000644000176200001440000000222213443526307012641 0ustar liggesusers\name{Psi} \alias{Psi} \alias{psi_int} \alias{psi} \alias{psi_1piy} \alias{psi_1_int} \alias{psi_1} \alias{psi_n} \title{Psi (digamma) functions} \description{ Psi (digamma) functions as per the Gnu Scientific Library, reference manual section 7.27. These functions are declared in header file \code{gsl_sf_psi.h} } \usage{ psi_int(n, give=FALSE, strict=TRUE) psi(x, give=FALSE, strict=TRUE) psi_1piy(y, give=FALSE, strict=TRUE) psi_1_int(n, give=FALSE, strict=TRUE) psi_1(x, give=FALSE, strict=TRUE) psi_n(m, x, give=FALSE, strict=TRUE) } \arguments{ \item{m,n}{input: integer values} \item{x,y}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with default \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=1.2,to=1.25,by=0.005) cbind(x,psi(x),psi_1(x)) #tabe 6.1, p267, bottom bit psi_int(1:6) psi(pi+(1:6)) psi_1piy(pi+(1:6)) psi_1_int(1:6) psi_n(m=5,x=c(1.123,1.6523)) } \keyword{array} gsl/man/Clausen.Rd0000644000176200001440000000132513443526307013503 0ustar liggesusers\name{Clausen} \alias{Clausen} \alias{clausen} \title{Clausen functions} \description{ Clausen functions as per the Gnu Scientific Library section 7.6. These functions are declared in header file \code{gsl_sf_clausen.h} } \usage{ clausen(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \author{Robin K. S. Hankin} \references{\url{http://www.gnu.org/software/gsl}} \examples{ x <- (0:30)*pi/180 clausen(x) #table 27.8, p1006 } \keyword{array} gsl/man/Elljac.Rd0000644000176200001440000000377113443526307013312 0ustar liggesusers\name{Elljac} \alias{Elljac} \alias{elljac} \alias{sn_cn_dn} \alias{gsl_sn} \alias{gsl_cn} \alias{gsl_dn} \alias{gsl_ns} \alias{gsl_nc} \alias{gsl_nd} \alias{gsl_sc} \alias{gsl_sd} \alias{gsl_cs} \alias{gsl_cd} \alias{gsl_ds} \alias{gsl_dc} \title{Elliptic functions} \description{ Elljac functions as per the Gnu Scientific Library, reference manual section 7.14 and AMS-55, chapter 16. These functions are declared in header file \code{gsl_sf_elljac.h} } \usage{ elljac(u, m, give=FALSE, strict=TRUE) gsl_sn(z,m) gsl_cn(z,m) gsl_dn(z,m) gsl_ns(z,m) gsl_nc(z,m) gsl_nd(z,m) gsl_sc(z,m) gsl_sd(z,m) gsl_cs(z,m) gsl_cd(z,m) gsl_ds(z,m) gsl_dc(z,m) } \arguments{ \item{u,m}{input: real values} \item{z}{input: complex values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \details{ A straightforward wrapper for the \code{gsl_sf_elljac_e} function of the \acronym{GSL} library, except for \code{gsl_sn()}, \code{gsl_cn()}, and \code{gsl_dn()}, which implement 16.21.1 to 16.21.4 (thus taking complex arguments); and \code{gsl_ns()} et seq which are the minor elliptic functions. Function \code{sn_cn_dn()} is not really intended for the end-user. } \references{\url{http://www.gnu.org/software/gsl}} \author{Robin K. S. Hankin} \examples{ K <- ellint_F(phi=pi/2,k=sqrt(1/2)) #note the sqrt: m=k^2 u <- seq(from=0,to=4*K,by=K/24) jj <- elljac(u,1/2) plot(u,jj$sn,type="l",xaxt="n",yaxt="n",bty="n",ylab="",xlab="",main="Fig 16.1, p570") lines(u,jj$cn,lty=2) lines(u,jj$dn,lty=3) axis(1,pos=0,at=c(K,2*K,3*K,4*K),labels=c("K","2K","3K","4K")) abline(0,0) axis(2,pos=0,at=c(-1,1)) text(1.8*K,0.6,"sn u") text(1.6*K,-0.5,"cn u") text(2.6*K,0.9,"dn u") a <- seq(from=-5,to=5,len=100) jj <- outer(a,a,function(a,b){a}) z <- jj+1i*t(jj) e <- Re(gsl_cd(z,m=0.2)) e[abs(e)>10] <- NA contour(a,a,e,nlev=55) } \keyword{array} gsl/cleanup0000755000176200001440000000015613446020402012411 0ustar liggesusers #! /bin/sh for f in ./config.*; do rm -f $f done if [ -e src/Makevars ]; then rm -f src/Makevars fi exit 0