gsl/0000755000175100001440000000000013033416066011057 5ustar hornikusersgsl/inst/0000755000175100001440000000000012251674041012034 5ustar hornikusersgsl/inst/CITATION0000644000175100001440000000114212251674014013167 0ustar hornikuserscitHeader("To cite in publications use:") citEntry(entry = "Article", title = { paste("Special functions in R: introducing the gsl package") }, author = personList( person(first = "Robin", middle = "K. S.", last = "Hankin", email="r.hankin@noc.soton.ac.uk")), 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/0000755000175100001440000000000012251674041012601 5ustar hornikusersgsl/inst/doc/gslpaper.Rnw0000644000175100001440000002477512251674041015125 0ustar hornikusers% -*- 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.pdf0000644000175100001440000027220013024375621015115 0ustar hornikusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 3139 /Filter /FlateDecode /N 61 /First 474 >> stream xZ[s۶~?oM' :;nEm6JT[(Ndm,K$X .`9 S3tncN*晳 1)I]d\c%Ulewrީ?l{yey73ȶW']Og'5OsO?֊dpRT?̊ ]>~ܞ: (gsaⰏ{:jZ,*b4"_`6'Qkk-q%N*p2Q 2MI%rXk* }Zwa*DƂLõF[yyy=2?ml3(sX .ڿSE2񇆤 4#`Wm⠽>+E[*A&K O_j(֫W"=cr,h9Lc?u2 yE?[v@WWܧeCDrX]Dߢ}wz,f擛^hryzȱ:X!2KTP9ow4تk"3uݦZVrfCV~KYY6F@={~?]y1J ᣨEvL}D$8<i A\|IP9JT c6ם;mXM^2@TU |^OL%u &1yF$؈}YٹT Q3}^M%]?_C~__1~o-y  ,\gUs?&}>òr Ix؟_E<, ?#~/z@O8)9HCKLY9h1VM!5t;s>/.Dxu1+ ^}?+.fqi\~OG9ncnjjyWˢk`g|Q9ÞEi󓪸|d2[F!^5cY,܆P: rm+׾-GsM-ߛ{XtH)Z˭Yk,LڨnaM@`Y,ƀodVD >76G&Z 3bF@B@: ܵUBO \T6ֆL4"X<)®yYCd{!Yw3Z&DV4 s0LSBUܒ&-\f\G4i@~]<2,2g2Kq&~gNA Bd)M žՉHL BQR`sJgZRtvm#C)$\ uͧo g'L\lӌ[EJWн\bwA^e^wk j[2M;$j5[+[w7&cAnYIT1BLm | _?{-VГ!X+yp"m}ݎ;i6!7ðزmSb =G>@0c@iPpKT6Qjsm0먨rK#mD_Btp哘I7iDv8¯0zic]hcX\ x.ylDDufY[ '6sV^l>koDeso0{rJX0gs,m='XX+m4OcD&]@#g Kg9 1y@ vIDa9#CB:},r; hL|Y% > stream GPL Ghostscript 9.10 R, special functions 2016-12-15T15:10:25+13:00 2016-12-15T15:10:25+13:00 David M. Jones CMBX12Robin K. S. Hankin() endstream endobj 64 0 obj << /Type /ObjStm /Length 2909 /Filter /FlateDecode /N 60 /First 508 >> stream xZms6~{sx%toI\ǩ+9N?(2-">,(J|Mi#(`ְY˄FLYǔEe̴Y2G,,ҚEXH1ULXdPԑP,rL²(fR'2P$QlSL.bN3$ SF`,T$5C22!ǂiD3BI+f4D5C3~ !PVI0!1a'!D!kc&f] b?qkn0k =!O, 59ى*O4*_q$ b AhN'4!9~?Kt %TGP Kw/}{MVWdU_a٧_0 ]T`1dv\x񏽛5 @ '"A릓"[NroNf/EΓUeWge[K:( 4p 2ͳǺ֑Uw];{\,*yl@ǁi 84F[mӛYUn^'>|AT"lTI8a'ɜT1T-3p @0WӃӛ f_ ɲ|L;2An $€\#s@F$)d ]AwEJN#rU3R"&S629XI202ary`N\U}sYr~{{̋Y_ ȋ'Wyhb!vaADcĬB'/ 3 "):]d7^U~Q"Rq'Q hc(jN2BN{IbC~OO)|29OHE~S)—gerXW%ꊤ*2/6<[%7?cClSNln+|'uCܿyfc8F4e! *@~҂5 Y74Tz 'u nFn+Z]E0Rp>i>r]vugMbח@c| TkIYM|4/nLdG܃%]U.kF7h~~;ƚ辅TBv"x~erha,ҵҵkO)6;^6 6pJZ ; 貃EDJcC"X꣘P/>.yѪMo=ANiVlf(Ru>:Q=˴u56=[|x7=Ö-ȶ(OP.%#]*#["H]Vܲ=deyn^fM'چSӸuJ#T!CC[:tr_ZRvQb7cG2a=`.28J!@8&_ Pq&~ŏ1_/֚̈́iW0{}D[e eV{ރdb72>-dlsr~y5?u˽h(iZ/,o֙RORsC1 T;DbM-KMυ>tt6a,=4>91o]O(ý2kVҶRuUE2+qуEY_D p7V߫y5y;HRj: .0:]]lÐj֔<3H~xs\h9> 6G^}Y)6wJ;i QӸSkYd` ϲFrzΥ4ӈw܁HԃHJ)z4Ď Qq] tm"JuuHG9a3trF-"^ "qwQ]KXaggX6Spr- 3uoW-~ALOS !WW-X9 V f @li|B/a-/! h_LkVhac> J OYCm *)'&b 'St[M?M?["/]n l}uz1`6nWc=>~9>;;:C0ۜde(?SS]80|騻]E] ֫2zSt/I-{iV&bC Y\tRIiՔ YadvjĩG!cI!Fﭚ6 4@Y89OgPl:1`8)U+1Y7> stream x\[w7r~g#-OoOc{lv%)PkCsH)_uMR[=hPW8Ո:[mWɸڝvU?RaهTb50F:t_w3)Ƹ<݌N)>x:6yz cWq} Ã_67ZncJk)]G?CH^9=:@P )E~6tu l{Lf}/h;{bMF/`F}|E 3[JY6 ݁';~i#J^zhyFҐR tHKaᰵX{dfi}@Ƥ @6ԘGyf Fa#((WaJ3ļW)g5qDE@^Al,Unz d:8sje5:{xME`GJPSq8uX5^ڨKF<BZ?4 | xW7au]!qj:HpB` |&"1VvFP |XowLöP;1CeZ"ħ٥J`6hx[camݽse)َͣ*8K.'Q%]DĄY~KU^ڹv%>X3Ѫ,24Ǎ}N" Uk/G pr< aKB)Ƙ"15e~è/&tJn8HRѾ#xLJ 0wOAMhr)n^_䭌#töB=ڋ5'xcZϸC=F!*My Oؘv0ЇI)kM|>" x&$HNM/8*|"f2Ĝś,+-ՙ9 ֏=[wɞ̀{_\xϞM#=6c]&kNjk=߾c\` ^ӟI4h?%<- *sc,MA R焇Aa3OLdF͹)lMBZqyVkR2gf 6p<5zcRo< U|m 8؊h*8bsst<6@7 ID{ ScE] ׋P Q ^hp׀:Ks+őJ5;'vACy_j--W+彎)}'h]@ع?JE 6r'| 6, FcSw8E@TͩG9 BBVR #JPgj/FܫTHܒFr!;jx6g;Iu "ig nn{+(F 2C(!q 8 awC`ME̍&_u:"O̰$w90:ibP%p jp7'gTU4iqi!{a$U&>+Gg,#|D.&RNS7fn(:ː]WAf7 1` :mvܟe0_N%Z҂$n!] qdgQ GĬHd~rى/̠DŽ…ĉa"i >1,X-ͧl3Qœ)75X7V 1 c)hǽʦV%&dyd ۽_Ki ֹI@c^ $Kh$Nmc 7IYL)!Ub: ؏0ދ.LNE4x::4o5ñ]eō%YTF04!P(CɇU'B&R^׃1Ք4}4%|fZk'n.bZK;~bXEk)-K.PnS:K s$0_ ѶRv$Fb;ߟIDmGlȆ3>֔HJI)ȐmNf#[Nnܑ5bɱ9D) 6zpA T!jeEưo<"9ሄ8qNw(Y2* 6N00 sh>.X, ڡ[K\% 2bDcHn;s}Gw"=5h YH )~ ]ؑ@i:0ݝFk3D'Qn^ZrjCqkgU 2Sطt\tB$BZkޟ!O}8X_~s]fP^MTHlh--қ纹}v4KD 5^,'l枕-;XsLKQپoJŒ}39v#N\d3!G&t#Z Ȑ!SQm{|'IAFi|qǁA|ǻm7q4'&M&{:`/gi]m?;̎o.P!2JZY|9.%sJ 0jyY} u+L oEoZ,j}m=~yqhoCӆ=]{*a=ng]b7TQrfu4i:l W!;o}:Gj QWSɁ-m؆H.5-.9a;]d Tn!ߜj1p q*#95bR#u} *Ԩ0_D6n٠8@ D&a̞(mpL:휳3Tp^Ix ߂r/Ҍ9UeO"-mWخ=WTڷQ j?3u MCVŚοk8ˬ"I1VCmῑh&s ЁlJ`+,P8ㅷ E 싰&HV^_"k :Z)=Kd ΆNDOk|+>:q (5,% ػ#̆ᗼ[X zەq. &ޙI^6/+ݱ y䩰Y{>3! 2F_J ~-HYHa{#!霡T!.IT"Ϧ~0@ nIUbJ&T=g `|xE4A2]EbEIĬ1Ked4$, JÌԤ':C9^1~0Sk8$=qN/ܽ`.bg[tLr>L֍RKzX!̦9maBصC=ț (]a`K]AEsw@q=JG4&ӄnb+:eMp0t@}!YڃbV.ۇۋ. Tu-^FDtĵH$W,:{fL&nEr'˂r_O,|rx96miF](T@xX^ɾy/u8%#lB.K:vQy=?r?H%);| `k0iГJZ3 x*IsBg]FnYY-_ MƺVzcFO2Fo+tey c,>C&de6 ~}@1!?W*3c5BY.tNFrXjnڢi~mG=LXܻ>"ʎ˫agG/رZ1?Dc;9L[Bx6ٸ*iI 4bdf45:Xp`{ 9K[D;Xx\,: Ik7.hR6ڝ7zk\TuvHΥE^2v{ǖ^=EoTIޠ$=j 빮Wg3ۨlt}mך3?r, kka$nM}`yteYC|֓(egv1,u~wZ3AB'G7Q ye2و$l4VF6Z"Uf5V I4'.7yp:v,%>AXi=A)[,r%}5MrB>s=0un.N宇EPӷ@7m1/B߳L$BZDrd!%8%%ԁѵE6N.qt!z_jXv[}oXy{qa'Oh  rVK^=H׍wY/*@ {}k˗7eޞg=mGmS1?L1ƤVۣhylm{ſ?aYΫcq!/>t XDCoyBLщ@dʰroC"LC,U>%GԒ;Nj k.}z]v})TW7.G^9E]H XO__mh-xz Yj4m/Ar]xC)_91F3A5k&;yj)ڗ`!QQAQB rDw@|uJa|]ս4i%, ӋD 㗛 Oġ&ŭʼeCz9-Lʼ][xxRxw~clbԖ07a17}@endstream endobj 126 0 obj << /Filter /FlateDecode /Length 5617 >> stream xfz֎ o0j6.Xf/"}8^mFQ}ύoNfۉݔo fX _Ƭޜ]RIz}'ٞ⨵g'/)ixUM&5~9YvG#= 7AZ wpJ (FôXt0> O ޏF0۵85&Ɇͩc ]y=\lOv8>pxۚS _9ePcPކ8Pӌ좇ɰfS̘>J3~9hSkЮa28a̛g'gbm'u%ؑ!@v=Ep5`5 ƏW(wb\r16s=eFf8͆q^DßB_*> GE6`d@9.kdB|Ӌh*'LS  o(3>,&QVnn@_w%:e тboRiD=P4"6 b#hi"V]5Qg5*V E2MPNF`\-i/$ #sՂm K2 ӭy&8SB$KE:<_?Nzfo>Š6`jn4`RCMA3NfRxuʎ,[z>wBYIr`В^DOq"" 1D|}[+/IJ_UH /_NK*Px KtE@5C <ou#P$DD.h@. 4T7PQew"BnX07(vu/x8H |,dMCq@7dTّ$vxFκQ9j {2JV'L͕gV~^y{ r:,P@ (1bRy-1ȹyy^OSԡ;}\VLcWsQO@!?u=Byp}p;r:A0MҦ %>xo"A_9Y ʠ\j c-nzų+._U}|Qב>GJ<:Y=ܕu<L4=f~B gb]0'"&3&7c«jsA湸]C7}{`>Ë8mR8j@9)[a >4*Ae^%}CtIܥl' ):ܬ|pI1,oڄȁ׎-Ow|6NkonPz[3U@ݢC[m|gߒBSl;MrphThM0Q33`wK`A>9BS|"ZdM#n>$*88QlVm>aZ (# w€ B Y_&dj*ooy]AErO8\o4uCl]k1 P(EvegW28J\(ë*c҃8SV|gX%Rb#i ^kj.U6V0Osza([㡤7aUZMI7 3Ԑb{S4Np%tj:]RsRLE4 >ZG 4baPog 3PlqKNԙS6o}JQ:\Ua3;sCjY0k z3 dJ pCc?^5BfaϋUdS GGi A>|Wy3; s\ q x]"BuiQnqn/XJ46%)ȑ1\9 ,e_]g~tݚyM-HZ3 u*;PN'Z"g:8!%2{c g2tɹ=5y㦣2?|۾'J"[Ee$ y̅-4MJab~* km oGP4sӢ ~nHFSH RD[4ŎĎ7Aob!^pS)HfDW 58;A,,7z84Q a(7uko 1@4i;'d@ޛoXf\7rxTҏ M1i:j, fvvd `ry g}]s(UN.X\ڮqfM9ZP`9fQRyı֧JC%w;_Z?Qh2nHp'+H34=GE^u6TyQu ʼnMW,LU`p2evRW,2::L. 2SW(mW( H2- &j5wmNt_t|[R1N9a)/KXpB H=^[1֭)s6Lht Y)v9I߶~v萕2 {Q*YiWK9uJ}k?1م{4=|\b3Y`!XNiwA#ekߗH~aם;٨{5"[vg,__OWw{K\^)IABp >H}.״wV .澐ǥ5 ]SHr+3=H09W4BƊLiH)ÂSqC2jjml/+"SQ$|6ʺ/ĕ|`w5wva-{`AJd$q?̒ Tk[mu&z"\i`z>ևCۛ{VT8BRǵ|W54r]AvuJ[1KUƕ5(\H[M1T8jwCRV&}=Uvܺ^ԇHu!>DSjE6 Rxq=!Sb!:];xz~ m'inTϽ5^/&." ^_qaN?vzEWu`2һ!,:e~%N(L6qn32P}}N|G!jnl>$i|ٌԾ?1_/?6Д<,w)٣ʧdTBڀ N-2h.h\^*N&3;,;Ԥ҃4=':ԃHQެ<|#bBY 667 Õ{{u rBb-RyKqU֡pЄux]bPȃm7^s'uʛũ챛ưGi\1Lѻ0!a}5OߛG]!`P`⮼؅zxQd։ؾ&&_K^~g-fmc,^ z& xtb]PleoU]R3cv߿:&[}XtV0ae|vkS o:|^=$۷ ۬zwendstream endobj 127 0 obj << /Filter /FlateDecode /Length 5924 >> stream x\IGvml0[,* pƲ4IP [lr"IIȌYMi40x`";2~ozW?>23:{u&_7ͯaux3Fѓ(kF[?Fm7Ͼnwb1?oh . /;h~2:K轚_cO/0ZU@a6K3c!ZYN(!ѿaZm+ h.}1rv ognIհkr8lcpf(!v-Q ?泂4B6D }]Ҵ:Fp#E&o2y2!@dniҠ0HYT0:o2q>M'17+G>*pQ>Z9bli,iAkz눼ub4Y5=B >v1EKkηV;  ZH_D5%Tzs_K|I20Ql2&+E0~,sȩpI[#F?)H%?Z$w$#r;+MtȂE!~wNQzIt"LF1dNJB&&nvQ nb 1$nrQ„US@u:Oz㤓mTrdtnW_lJ;&^3[Zg>[@qtVYڛԷB+(K& _2aHꅅ:K4_Tq^_f!283{I4 216s_l}iϪyaOZ k,8!>&6\Cw m)EI8BxL$JFM"iY:mN$Gch R11yp_2VF״AGowx3"i9 $5*F%eiխ g{P#MH@Lҕ6d<8BJ5tl= ~qKHVX٬ K-,G2Ĺ߸\3YҊw8LS:im=k7ib5GUü`]5DRT;$P\tNj#0^|l3 $*7jgt+O@`/ Bu_qiL0fm\.zݰ5'P^?8 ֚e+ A)Wgp൜Rԋ,)eVkVlggMCU+p=-Ŗ=&7+W֦=Of|'IVxX6F Yw .Bg€#0-Xj+9Lfӈ*g?2E^\‚͇| `8#q8EKn|ez^)1+n9#[:$]DŸ_ϐmN&gModˬPYڰfz| ,G쿋ECb366hE:2"A\R'BLo4rj~G"*$A~b?~t3/%nt\OHeO=NaFHeq#GOgDZ>>;'` ^ַ7P_/y}|au+F >M @A@I%ҘƟ3J [3/<}}3vb06ϡ/axa5ܑ3Kl06n0oےn)~t%(H;vitKٓvܝ54Y6v$v. Zige%GI h](Yr;4}[c&E ^$b9 4 ca%p^OI evrWuvC*{SS$PH_Nũ3%ɶ2!@6eޓzVa{۾we /_>ScI 16ëpP,-CuÁ/:S$4g+?J 8oi5'cRLDr9ߙiȾGO=ͩض۹xEQ!%j4:3P~fs]J2E)<"HRJfO]$Q+$>FA{2Z (²VQ+%l.] i6t55+\05 BuLJ@"C6|PjکQ~j|-H Ww>WsS'.IKRS{'J32ZmXd*U?xLchU?d\alئ!],+> n#4vT2㾝戧1rrCwRb`[,ኃs=LSd7d5⾳,%yjCLlQYx\4[+߁@sbK#Пڍ!Vpl=33ʰ1&„m.)}?x~Q2eP!>L-C #r#FQ[|*N]rTSZ,4Bo`h<$rNȸJhEA7a n7\;c)A<_t1Rq&)W6j 2 ]ÌJO 9+%2K]@U)ʏ}IՐ[#iQ*?-ղ]RL̔iY\d@IE:oЗn{;]nlKS+0W pދպ6mcO-fN4oVtݎ6[o TeZK9G&%k&ᕣ΅wۅpD+&o|<'Om();$G\u|bt0||U3NRm՜k睜.G⒮rpKS3T^s/,`NZ΄ugeEdKe{mfO΋@+R?EUp7h9jԔ3¥њ#:{}'"'$<&CMnyvD̶JK?*xzQ4aB ?>x5`9&DMJ?'R~@r) a1U.!ϸL¨,U迻%G1zr!5)D:-bfd:k-0!i, ^bnNgP{$'QO,o>$S'.SYĔT;5>D`bWǚכԬuYkAxc ne dbbgGd!pf mޞ z;sj$8/@%BG8G\﹣Ih'9C;7#nټyCS͔2Mqڬ&ph#|XzT^8Z mږvTa#3D=mhD$ o􉐄xxj g?Kƞ˲Eĥ@, {7) LTXQEp(FJd[6$Gi?|O@4Bm{ Ow,t2 <9'u&a-yBᘉΐ|}юƎzͭz *!NDv*ΗHB8T<Y%] C5?1ػ.cu>nIG",D;w 6wWùx*[ts)9qE=L튝yJ7vJm&L{h8|~ȁO*9j.KE%=Mo~DB5[]:`yJfDQmD#=³!!rT%ޕ`eSR%n(p K&)E#L:]v:߯HL |znta)ݏӄ)I "}ϸqC%Z;rԟ@1^y?_ANy[UETI"(.(/G9Ui aF>vnbQR b3-S_K*M 2#v]hsVJgyg9aG1{uy=p/@"N&Ba@{j҉Y]cmᢾ؍7I B+[ΖE/J )s`Zx-Lݫxwc;WwWo7n^̣[.KMĽ``tU8 =bfr~cg<%785/WrIh`} )JǓ ĕTI7BX"9>K=]!&Z8 y_Nu_Xƅ.7hN> stream xztSẀl O$tB/ PBqoeK:{dM6q8!@H@B &!!!!WM7k嵴޻>\!lzP@`Iz,־w$B!7dd=t6A`X₠>NG;M5k8'r5ikgk8y>}gxӨ>vDD׀ A;iggOEAN\<,`y], uZHQԚy.޶0Ea×HY6ϸc&LێQjzzZGEFRQFj4CmR[8j+OmR"j"D-RSeTjNfPzbשj @9R*(MdT/j6ՇJ{DP^ZR3ʆR   vYL#ZIƄ3z^֧}m[noeS3 n# ӯ%v}uGxǡ栘A 7DZn8;ݗH&'?N 0cݰM‡);2|K\+::Am >KdpHVп\9y|unPP0h= W[ yWJF|WCI:\4&=A:P̣PTt&CEOoZmJMd^טoƯs=E52oIg9-[){ 燈? ,̓7Y<@̬ u’g hTA5wek#x,0X$pvfw>pA8 'Vn7A8 U ւ'xFtKV`,=!mU./E&ƴCVpjW3Ȓ /Lw/j^!{k+Р0%~O$Ai/c3ޯ>8P$h:V? br 3^*. w[cOmw Lo8M( )^Ő)KM$n<-Gǂ1^)xIw;dB ck%Ttg z^32d]$:}!OݮJ8l:=u޿X$#W)Ņ, >sS-y`IԠcxJ?1%_e2Er:7dXjke"ۚL$Qc'N Ab %aIxm3FQ`&jE$ExB|>Ic!u'~%FT*&MB"+Y1Զl7B{ѻkČ#!kM6M4C4[8m D|S" Jyջ8$n! ̈́[`D dnvf;!Kko ]$A~tݔ 3/et֚嬖~yI6lʼnAzt(ֺ}; W(pīt<bW4OA$ثpbԡ r "(Ǐ`pVTF2үq5=NhRuw*tM|MhɂBm^M"<<}DEzQ<'W! ?HC_@?a{v\gW /|$?&;F#rmMIG=ȗtϟΡ<8NyVUء߻m!*̑&qy*ڮ\y7ɎfמC ˞ez~IP ]V|࢚tpe*`&)U Tٛ8۠Zy>Ʊ JT KC<!#NCP#5F6٠#4}{MpڛkϫhIwǹ̻W/+Qg1Γ]*gҝ%!e %GM氤$,)NM5!2%~"vjSTfP:Fj2  ;F(Rħs2#qHG6}5Im()=!=Nd΃&#'3nL?r57 !ڄ '=:loq*1ѽ/4J6` ]O |SsșVhnhZY+Jty)u;Ԓ#91YEߢ@"ݡyIy,r71h&;`mnG?jfe*B~?EKмǾR;7ݖͪpH{EF K>#1;&UQ4|) oa"Cj2J9k_UI>hL!%>W/h9SZȢi|V[N*5=j4GqFhUBLHIDU泹Moc Ŀ~E: r%8aY0b~ӔhŨ.^9U_ c4hP1xKye <:8/G@[oPH{tW\f"UG_uQ7YfOUVsD!(yցdkA}L=5 QJ43~.mD=pmgD(!1.!}5q̐z;]>:F#G_^8vUl4?chb>c-6ؕ&`Qʢ2"lH1Շu'PƚvF}F25gU Qld61O$ _-*PUP ,J)jU!;A2K%ڞ)}i|~ιsz4`Oċ٠t6k̳nehe#@ow9=P ٩R][hdU5sFbC%I AH iPVk jQҥ1e} %Ъd)2H`rJ3ˊj="\nkV ̄Es1xHc|wPiX ܙ?n@v/nRmZ ^d_ط;~xAin-YYh)zY!%wZ5\VG{2٫<H}Pɞ Hl>b GYGC9j٤7GIƳOoXtM@4-2polH^̍U/dD'*Aұ.lPJzeZF}ŏ*;$[NНZ M94-MMoJ ipH!Teג.5uL?Yr}vaIU3L+ =Ni'@̝Zܮo*UB2.ڭe2߄3 y|`In걄ьqerMr>$(psӏl֞P\P5r@=:[L&7V[wܴzӥgxңy#zŽ N$iuh,( pl7 E-ڟ0{-à`uy@of _>:",Pͪf(~F_IR艁VU[)xbAI (ٜZ5z1 TC+5qVU/U "y")@0T yw3eD8~:4L臏 tCfڮ >]JC@h.(Dt,c_dHz\+7\1ص-hLuj/YUer/ye|>FQ"vսŎvpȌLWC1h e>dLC.0/eHg, WdńxW]64j8=fk']w X4N #&Qa>[g;w R=m-?4Pb>hzzb|9ɤ]6?CR"E-b ÎLg}VI2셤 >BGARAF5 #+K[ \FBO 9qbA 8+/j[dLQaaXiJ` qakw)VO N{$lITe~j)*n%jef܀|ROw,f6H}'Xo<|phHQ։{?2}z DÏ`wԤb'W^ؼ`>!H;\dM>5q;&Div:s F ~Ԡ?/~w!V.Rʢ~s"`7Ϛ;k/|fMães=BͰ+XQ/;U]l +$z,95bHӟMް-j.mg+ߌF6sZvcc`jpN@zvK[;L̝9 z.\6vluXy``XX``yXuuyy5o]xoHǑB89%'o!Zymc75Vs\MVf|&Z#@nhчʅ<$$*V&r_eK6،&4 Nvv,@R"!N(.""JP7ob%Z)0g%&Cb7=#thA\3n׳ѕq{rNTT( 6K2)i)sq;ԗTVf;`zBt'ġidh~4Cp[p,${N.=[LF6Ӣg'MKw!??ɚ`+ҲpCn@QiF*W4JèSx `OsB[3)OKyᎡyHw6,@( k1/=io5̾%3P3:B~<6tע:QFD@dp]{Dމ RK.><{c#*Ҡ FWQΡWI A!aa* &~`Mx9G~{83M4OQ(R*!n0lE?kaosSʃ /-++9u{ pXwGx t֌t=AzO+]셰nedpZ[Y"]Z@w&W қdJG"pqc";t>-E%BTVqZ2O(5tJiXuZ: ;(뎐߅p+ϵ*r0?mߢ9.6ewFKj/ {㫬1F}/; \Y'JQ/PJG嬇ecǭ V74_#ޥ54SP@{YHc$|r?z"uJ7 y]||_o0GHуã}׸xpӃ͘F^zzDEۭ5ML$\"$0F Y@ݍc2=R`{.}:(.U'AK%xzLy}JP%L Ŕ0vRfD-6ԛe3Cק!OK>})+endstream endobj 129 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 3953 >> stream xW XS׶>!pr!:s֩V+Vs^gEQ0H@2 2&LPl#z8UlmU[oױ۾N@~}A>`Z#lm(D"[=haDn#t7 gv ۺv(D O^ڥS+4.cs77wyJ?uv/_O.T4:ͮ&iډʰ*q.e_:obUeϥ+]5~j/?uEQBTa6~;+S1m̱n=xݡY%Ɉg  V[?4'bKl'%ND+ڠ?3G|4v^xʧnDmIfE 9b 7q&Ξp7/\4[q8GF۶Jl%~@9:NyF]p/P^]A \|gqVPrьuKuz/e)8bCՠ &iٳ"zH(y"qb8sy1`jHˌUL EVʰ1iK?iw1~kҗkiU 5Z DheѠ/l.ZOD4|u?_k ~A kS,RT 43j10$2]֐]b.ICe`TfDDq^+4́S|gpo+݊ #s.P}݉d q̸Y^?ȧ[®rhlV^7K]RaXH]:c\'ngÎ(#  `!P u7< J͒!^*l`Od.L_ |+ˠwk]H+P@]|xZv2Zcځ^"M[|< 0 1E5}&,6ym(4FW394)TB^~,J#]| 'hcLoDء$`5~M3zьv/X/`=LZ M`䭾-bOҼ\|t Yo{U'FYh4K/ ;StC2DcrDL\82`?S+S҅6no}tdq/-:NHNH&s)3}oPÌ@"(XZ{u$Q|R۞$l}u5>c̽P4C$GӁIIfY$7Z =2rFh3 jH@s#](f^ukNf?|nQ!/Zt -o Vuw%r2Ikj ]([3c;~tҧ_ 5<4KXJkbЌ҇b?~ q$FWmQ̇[0D7Ly3_cB'ߵ<#ErcϠ۝PYb:D5gܚ1=vjVhyəsH}pvŕA_1}Si-[V`z.6 gLLieamed Ef`&,;}ki`q$/'T|tbr((q|g=]qu'bs}+&NXHڣ+/0SA{r3_]W@;e1/)IcK(kXyE c"o^o@=,(htWmnؿ7[/Gtmu {hWc -?qCAU ,*UP a/] >)}g y\\SR]79ߣb~]v#zŎ~ݘ=A 鶦 *<\7**L=F&F?ށ:?l_ƟBT'| Q,q]a2&Mi&<*ЂGO9}<[niD(k5L&Ӊ>Ҁg>kDMd;>kb"+ck}W?{;݆֏un:- ]Bwm|G&oh9RYɑYdTaܒ*3Sbw8}, PƄw)HH3KN]ZlbRJ*0Pw{ | Tq$>w>vSAIwRce0ub.W|X`n}y +<Ξ=|cyl@}'1smgDFm\Xc+Jٗl>?+vAt!g+QKV,[9B\a" jM>hʃ}}N.o:Q( 6ALccKV'sM(^h/nfSNEAjFV38?#OdշFΌΧ:X0CW ؒ-,Qēr4 eY -egE~ud[ ZwF%+Z)+w̸m{(>Pt.]cLZxl%٩W 蘰2mMPOI %oS; '(m vj999 @F_'Ff䦗v~?n^2o/rof1-akX&ǎDό(G*!TR-/"NA SJgw׃SpH C^bgڝmW4&pxgC*fᅩ3:G N܄NR!زʚ ?upκІ9gO,c5 YB2fh "C-)gTChJ|btrzĹ&ې{_4x|OqbչmaSI4gI1&cv s'$IVVm߶6ct[ӈ4ZἋd!NAd y!r'&$DAB_ב8MGUKev3gjgHP"8˟c{D%ߗʂs9eF=ƈXy 3e$]%>U$mTp* Ǔt&((僚l\34YU*MmY=ػ vMt2s_=Vrcvp8mCendstream endobj 130 0 obj << /Filter /FlateDecode /Length 3290 >> stream xZ]$}(?#vl?AA"^) .*}VDxvUS68O_]Io.nyyۥ<}#Rek~ꗐ[[J*[ܾC°dPk+my@7O_d*,~"RjZ /my_Rް$;#&q*ya,.ѷ8 _]xaFAA\\>iP)mi| F1N~4/11>#~iȻK ֕Đ^zC qk>Vb+qs~ \D!OANٵ-)ӨR[N"yT<>'0 ӨiԴ_YFm)>!n!~a%X`:~~eH hEjsx@GSmN_T ?;. (^1k1 k4@#lJ[1 zQ )mM,jUB~%8~3@ZBpARԒYSj3gyiu ' >-bG qϰmȤ[lhcI/7aƨQ3l)!dZf$rtgNJG3ŢÛgR#ސ0ū爥 gDTR%=$Z4 &<-ə*҄g\ [2 ~QtOcՀ+ap Dk$y2nQ{j(43D  bn(/PbyfI:en1.eYlۨQS\:uwLL .d-Јsr-?p(Ͼ;[PshjOr Z3 ᙠ݀bf87Ä|f@jitr:9- аECtr(P&Dz@?.ј)uD'Z#'t qyaFt3`8W΅~s nr&Ks%&,)4CYM_g( –2QQe2PvLuKRDzsq͌3]Npg8 hrQ;usfhzfENhlJͅ93ksH[\JG2+^ ZFϢ.‰OmLF`urVq&[>K9r#J/ZhژmKXtLHLr/EJ$5)D),3 @-SĈUN86Ji((@Ɖ$ ԤD]4xթXv`ht3Su3Ȯ2ƩjѶ+sa]əuN :x Tl*;=g90g&:& DαC "I={7"W"~RX: Ky:UCNmlOY sӂKO:ܽE0D5QǕsq/X4uH)Roof?Qwķt$0Ea@ɻ%:w?uw?OcUpX?B Z0et!iE6%5l=Ck8C͊pYY-MDzrV,M(VLi?2hν! =w ;Zuxh8teAaS']foxHYl{hYPQwYT_DtpY#1Sһf+Cfcfc%nhBWi4Iz-fg1Qh1.,xK{+;,>{A9AC;r"إA&j<;`vJHp!*-#); DWD@lB@ceB"֙0U`eviz.NPt}>!PJ;#)(鮈ѳˬ!;%H:Q2aavD3<p>Jz:@8@T焉TxqdH(6 YhKl$Rs]#1LIj? Hh!涆6p N"I\= I:t=w=\_h|ra?z8f lbi12ۥmdÂlf09,|lK,+i 9,)'r*pw9)Lv96$K]w9 !~M'ecpJL&S#]UÉpQ 9x.'9\y1C$m]9,gЮђaU"laXĆ~%0+[hAʹaM=1Jٙ8)Ņ!e3t+exǖo@ CT ^OD`>Or|?ЧOz-HG %vA/}?"sRm1}9m+VEV+B0o&ws(>ހy ?f&N~;ua)͂^+'Q[7".7}x~mtTٜ,7O89:} r| Q0Zzw\{hh>/=5[8 zW?3 RbIa[P6WU+քג 癹@`^5*@x2X詶0/SrUuvBcnd;RNGm4YxG ?_%FUفpgЂX;a~ 3$BMsta{]SPI#p mK'͗"QP-w{ĕ6ܯo^^kH󉴼?x%Ќr;eu"y ^]FqTϻO.,ryQhz(_K endstream endobj 131 0 obj << /Filter /FlateDecode /Length 2813 >> stream xYM尿bnd-2-")9lK1lקIɫ@~*Vy6w7[o~ vu^۞!C| ?nOVVRqMvfݷM* r[ x'5涿aTZcu2}-P8z>Y?wrLmK5KJ.z7)kl[L5;6Ib3o _lY+"H[Kr薪`=j{aA5ж&3~'٘%7W]ۻ9#ͳHLNeE߰s]Ȓ%dkYrP'gdɪE\Jk9$Ht-Ygdɒ\5,Y9C:"KViʟYKؚ`eL%oR.pi9/Q=?3!r~gBG,iaLu~«3|8"WYY kֈ|3&XadUVnѭ5'yM%koÔxX$ZB,܆rE0JvK1Fv_+{X/qD\94}+"vJCM*-Br\ S#:9,L)(S BxB `#,X3IɖH.` "M\K@Nc!% `MC`(h*H.2F6$1Duؘ6G W9)Q#ʊ%d3G \1-I}N2Ba=~f.I=tV?(Yo?K[ѐ R^рvjZшXV/D# YXl[yECgm}p-.hYАJ!UcDCWnDe )m/`Hwx2= lrIh-0#69c AF.!R>o 1\ 6,%)JT8#,ݶlSmTB M‚-%k%U+β@eE}l0fh*"P} NG# ܊@#hWX%Qr(W$-͜Y`Xch dFhoD,,# :RzK4M!z z&N[@x;jbv{vt"*Jˆ8DX}툃&ŶEA'p P#Ўd2 ̙3T"ʞI+AN}W X-f{;O!j|l(>Y@M'tP2b+" &65;k?P{L b1CQ*+* oj0Gu(Ӂ7*D(!xuy \ַk]#8 p2jUFpNRưG'DDƠ*E/pHc,.ytORFUDʎG[~ 8 GY_3__2xɯ>a4@mҕ qv#R*Gnbm#ε8k<<ǣJn*uJ%ǠVX׵;,8zh]1 ""+k["i 2*au)7F)G~NgV?OA.~Z97r7¹7yX7{~R j8(uv*O!އ8t#a&32b9%,Cb@ 6h]@Ip1ek8}:4 !:N$ uq~ ڕဿиya8ެ78^WǑm1Їq1 nY Tl]"a9p(ۻ0phD]VÑ!a8R,ݰC%Fv>Fv JlopNȰ;p`бftڡpb?p> stream xVipލ,e80Њ 1: sm.raR qpR,ٲ-YS.!|We GcL(M2mGW:0?vv>,I$"H={R~!?0PTL_-$$%?0w}}/G/CH`,UUzŲTu,WH]BM-t/@}1:cW ~70c37/vҩ+Gdui3[14#GE;RπPA4( dBKhZUꖼ뷖W82{b uff= î?(+0 FW+$۪A|jq~QE7Z$_?ZDZ_lu-J `񜳅m:f馭&! F+ZJ9ylBS?P}κA3,zF=#g?93o?ߏ~+|Z+[)kj#hM\?/@6yrf N CK>|h^[X&?)s@}h_o0kц j,FGap6R(1c$/bZ>\o4m$iw3 f S_g"VԾ}[:VFkuPdD|uo7HLU5TRΖ.o6y|yv,\ybš9Ƥ$ݿendstream endobj 133 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 701 >> stream x5ILqglN*`bIv!4B2PiiQW(a6 4PB8xx^P p{}g0C3rOL(\|F"Iw8NW)Rtj#<* d807YjcSR5tRBB }e,5sFs'PG 5 DǤ9>5>fYkR}#VCj8#2F68:W2鼸Ӑafp1W2a2kubR V|]t*G}BT. }sv8PU GrBe Jy#G/6h^nEj-ݯ7b+O_6L@PPkEL~LNykM)}IDAhP_xF??蚷ϨF}]|;tɀ0;3ܹZ(FKJN4YI׵&wljrhq=gy, G"QDDPߪL~cb̻/,|@,it[9\ պ{ _ޡZaKwUҭa{I=Γ{w>KUu[uzh";D|lj"> stream xwTSϽ7PkhRH H.*1 J"6DTpDQ2(C"QDqpId߼y͛~kg}ֺLX Xňg` lpBF|،l *?Y"1P\8=W%Oɘ4M0J"Y2Vs,[|e92<se'9`2&ctI@o|N6(.sSdl-c(2-yH_/XZ.$&\SM07#1ؙYrfYym";8980m-m(]v^DW~ emi]P`/u}q|^R,g+\Kk)/C_|Rax8t1C^7nfzDp 柇u$/ED˦L L[B@ٹЖX!@~(* {d+} G͋љς}WL$cGD2QZ4 E@@A(q`1D `'u46ptc48.`R0) @Rt CXCP%CBH@Rf[(t CQhz#0 Zl`O828.p|O×X ?:0FBx$ !i@ڐH[EE1PL ⢖V6QP>U(j MFkt,:.FW8c1L&ӎ9ƌaX: rbl1 {{{;}#tp8_\8"Ey.,X%%Gщ1-9ҀKl.oo/O$&'=JvMޞxǥ{=Vs\x ‰N柜>ucKz=s/ol|ϝ?y ^d]ps~:;/;]7|WpQoH!ɻVsnYs}ҽ~4] =>=:`;cܱ'?e~!ańD#G&}'/?^xI֓?+\wx20;5\ӯ_etWf^Qs-mw3+?~O~endstream endobj 135 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 669 >> stream xM]HSa߳ZLDTlnua$n j مmg[ CW/⚚fSq 2 B !" y|wb]<<ϟ=P)Alɥ_!)!.8^ lntsvk; |{?1n*oP VM{iiuTKp^keh!H׺_SY)>㔥M]y mTs./MyQ6c=4;]mgXF`N0GIhM >Cv $bUF2NNx<CM(Eq N&\&!kB~/X5clhdjc=Ѯ;ݽw{ME<=-/}c8h4sqԯsb!,cM8%4+qBVKJ(zcDi&Nf&DopgMR8E.Nc%byZ.~/O+!46q.8.A-aar+յ/KgFine9j#R "ɲ<ϲI>J&S&Mkpim".NL|9> stream xV{tSO E9k7`;2RPЦmZI<77y'm4}7miT@DsC8Kum<3wIM~˕[$j5rIERtpڵk [j\R* rD[V*+5%+u+WT ⩥˄*RKeeRpF,p[^) riD-UH8ɕ"l&/WԺ'9Ŝݜ=g998+9s6spq]\9g!>΃,SwcnsY_2/g^ [-س@` CddLeˉ櫼[Φ;#@ҏi_g\_ʗ۽@ۜ>瀝 Wm-dl,!JoŁH:;X05h\,_]EEP2QҴ)TN3C%ҨKL6@M wrjP憐ٜ ̒M&pmrn(:  ZC8.Hً_D,HaF d u{ =G9}ҵ p:j ,dv5vZ)|滑@⺯9ݑ {N@4PcW@VwwBqL[NV٬H٥x"f4Or^Ù n!HM!IaqCHK\fy3Ђտ]fi% Lс9Y-4C,1_A " :ZuB{{K|(\&׾qZ+1"9<l.;;[Tc$3gxh9 C;Y=Y9yV6T wcWġZnG4 ؕ==~N"Ah@bP0V,]5) ~Χ(gGg `ͭ-3;ecm|pR1j%keV[b& =Ms'{H"#Q*$@*8f`S +@:u.;3˴Z.!<0CSRm:2ft#@Q 90}.d6;)K wӞ0tzmMzAx/bc զ)wP|FA/:v 1lL|yL-ngNņ_pؓ#tk/%8itT%f7,F&RYit-"Guv2iDb4'ݓGn'N[Ov",#fmEigQ ToWPˉh\(}mM,sMpQ0qv)Y ,>6]~jLLr7fS10A e+-!0[f5̤~˸,ʣQk/b9_Ι Ʌ߷V1jCe=oi_gyQ6"KUY02xlO#r%ejZpVi(;ᄅiio2oK\YJd PYb.Mڀ$T5Om([o@~C|~t;@M0 ⃕euE,r.0G7Ͼ v_ܻWʢcf-h_g8N=d3#X UKIn=C+eͯ_p[FUA{2tfk RL9R\06: +_tLyHM$UU#PF +,4R0u]hNԷC;`W!U.+^GAۀb5`a4PD|:l|t-^A 0%^Wn!MbP6'.A/67ogY&GJfIgfܭKrkz6/0JR>m7άj醠xwވ?_ޯ$W_,l* u9hRuzb/p np_3uưژV.lA 6vزwmemacIegor R tfXh#=2N 3F3mYLqO&> stream x]1 EwN KĒ.ZUm/@D DCo~7.K{ :l%apA7밚Y'†NwZmg`~8bo d& }ש9E ؿ܀R'EzY&I,W:sp'fB?0g^M15VYmendstream endobj 138 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 652 >> stream xO]HSasֲbپ$tџ- M1K޻]MݖצsnES,z"z A}Cˇs8p!$bSKB:FJ 2A * gw}D2$y/49m\v@E Fcc 8Y_omg-fBv<t]5sZ8Y7hmGwV^fjdl}m-NΛy:byVp,G! rD!L6g IT8T;]YrL H(bP F4 &GyqA;KX5}a>W,sk',>Gӑ LkQ7>ULd4 <ŬB^y"K-)e n0O.\V5 L KT[OB;HM cu.k=Rg?Ay_ej)ug;5c'o77.bNVWg 2xx|lƨܬ2xZ|)0E8HLL0C0 '1{~kJr9E.Tq Pendstream endobj 139 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 3598 >> stream xW TTG~mC'"Mh|и1Qc("b7ր@w_eeGdiDA2.FIF.1 #އED眙9}zzUww0fDud)v0^/qȆg`)K#se^xT" P n3v6'LqppId T6˃7Gی/<| {IIޟ`g''TmnXccݤ"}Bm܂}B-$4,|A5+zfw_eWl 2uڌIf$qg2˘ f%>|L`2su̧<ƙLf0.Tf!3 qc3w93 ah3&U2OrMaROf͂~1O 2 ۗ eq\U^Y8Z|gt--K2~3%w5VFqaDt ht:PMDP@l@pnF;[p,'}C K'#G48U9E (AOHŃ*5c^dds{. 򵳂-_t8Ydn\8\6'o[Z)uP-1-bq#28NE'dtDO ޷N_ 넒 7۶?V7G Jn,̧ҷM@X6 YzW(<|'O" Z̕]sI}(FiP= yCF)u݅5"4}+qJnرnMR͎~Zk|r5*孞Iie3bQq!ΰ,Hkt@DA ,0otPPGS<7ȱͰ4\qEFְ=8 U1_=-7| 47nj8"f4eP0Q_FQ? ͌2_P1|E6b`HG;uEL;S U Zj <-92b9HuTDWTU 2(R%SԍD\N56 A,+Άd>(|cu^?"S]4fύ 9&ܜ`mdh 0B`KLw ӱ]9/}|}H^3ҬA`k?Q*6v%Jb0yFM{@sd`j9@=V)/k´b_F,\;QW>_sE٘8z:X+/z{;J++ҳv4G)fT_"=Pl &^\(~kd/WԼLQJt|m룶z l>Wb Yo/%%&H3̾צP zb~5F ..V1hi!{ݺlSRU[A$@b>*9CXq`@}[]k*D :-%BRNʫ-p5VmN&>B9e='n6s%qGKjCFnt猴JlȨG#j_IrxJ?/i*϶fB4E6N8%?k0D^ UN{>%cuϏ&>EY+lu8PioH?R\WXsHaC,rVk71vs'M"ė2#X}\N&%o&@I]~SoDC8vyvљCwϯǖ 'p+s9Β?ȳ;IS7Ymr.H"`<^[֑yKpdY7!w_7%*ܯפR)ϩF8,FREx254NYv{5 ۣ(c(J7DŽ2\3nv<ޣRRY sp'S> .? ypxȿ:~RpBh)u:?e꼑`PQ#OTSg\č2' K<<}dG&$ʟtx5+{ȈҩuBU0)-k1r,XG7B 'iC /RͿh)7l o8bnɧą^k:2յs้M$`dJ=oH1K\$[ {fCk[dp1]sIʨ5d^.xqT=Hԭ'^}0Ix{DD'2p Gl*n+rƽGΤsssVIS:|")(wZߛD7E$FYJhnv#P oFOg/޻َ9({ёR9=owneS[ FfCyei)i-\To gC}y{J /qK8*_ҥͰ{U DBbz\FZF"헦܊m= S?9JaW^!.{;@z&fvocwM7D7,1]N-Z7%g]ǭrLR&PτXJ-EW-lP"0:a1xc@qN=lxUs $I4#A6I^fbսx ; #rɨ9P5Uz)+:S ^?s9X{$@IƆK }p L@5AGԥiS44n{&zp+E2ߙ8lNljsd庝ZMI[s&2"1 GVjTtsmb\!BɁm-(-^^#=4b=>t*fqh.GR [9Dj(G) e% Q/8AGsT=?N} L,6c42b: \Vk8XZsMK!bÜ'}WmOec3u~yqGdy;{z5 >09VEe*;0gDX;OF6dF -,{XZԲo?vendstream endobj 140 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 360 >> stream xcd`ab`ddt v04qT~H3a!Sk7s7˚ׅ' ~O+XX_PYQ`hii`d``ZXX('gT*hdX뗗%i(gd(((%*\c8)槤1000103012ԽK2>}wy߯jcws~7yŞ>~nSg>;3wߛgO^-ym̾^];ǂXπ| wt\eXp~|endstream endobj 141 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 931 >> stream xm_L[u uve郙{4n0p,366?RV7cveL`QiΨ?9%[ML|99'999CDL-/.z*n%sėH bay(HPY,v< j " mSnn N}}yf4 ٢=̛gwm]|>_-=ֲ.Jy8 ]{ǻ>j>!pV[8 !$s5zJtAɳP(9[ĝΜbP)~iL?c.2Rl+umTW2<|% FZ,bD(؞`Nɍtsi<Xy"Wc4ޖ$)<$):ģ*X;i$+eRopx'(6h7Δ =a%pj"{@BLqdrkw :L_B$$r qkZ5k={n{9Ի=j4fdiR@ڕBw7y3]F`=s>w>㘲FM~I- y)BƠg4 \Z ׉q7?# gl7kgb@o{;:g(ϐ||hxl40m Xv6Ot@Iu{?6O L9!5R3WTm WWq2HC-X^]mM50 q|KQ5.Z%W/*_d]gi!uoj>\w?& QyzFOӛrKFO% F %B)bendstream endobj 142 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1200 >> stream x=QoLSw}d ϮS AjpN&F FPSP( 0T4kUl蒩cJbaN-a3V5ۗ{IN=Fd2:ksf8iL ˡv껩PAE Zp&Ϣ2Ha))* DaYZڪ$aҥiB`)iMf`B`k֕l!aMV:%n'kdhmb`/ VҠ֛M6!Gk4/%lYfcY`6(&bi u+)u*ʣSTP3Bpz(snAB>&TSS b(m]KTu텃pYK@n~\ה E!'nFEW5H g A'R7T)T1t }pޫ2XP>>p?]]z˹|{sPL/&yvBSv[Hi3!DFIitÊJpÞPh$s E%$"Z%:F߽K1>1RP]rÊSY5|ڠRѺoI6:Uw{RWw>=6/Yqxq6V>+>\NXuϑ姯5s4?[gaC)NC4?Dh{acqΒ'$g3ajgZɈ?=# HTvySRCGsAYL㴴XP D֭dC C> stream xcd`ab`dddw 641U~H3a!Pnn?'~.Ș__PYQ`hii`d``ZXX('gT*hdX뗗%i(gd(((%*@ܦs JKR|SRTAbpÙO3}w6р2n*ߵ|UgMX`7û[o~}=ٛ^}ω33~o~ZyRwVߍؾ>38KtᏀ9^;i: r\,y8Oܜ_endstream endobj 144 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 4251 >> stream xX tSe!4\+P#D|VDt@PFAbJM4]l~Ii޴--eGl)p3Ottn9->=>$9mƏX,ք՛v[(uNh&+и%t7Cq0 7=4=aꛊ=S06%֮%Tiyы/_6?zɢEˣWe$KMx)GzvQ"?Y=TT'sssgd-IR~;o~t._jrV$'9)eP9>#9zt G?V2dI&QRDa#5Wsr7$lOLڜ| %]3=c6 ۂmfc۰9vl6ۉva1nEl>[^`Ob/ckWuzil#ۄmfb}l^x,j+c㗍G|+>01cR('/wc$'Rxꦼ6۩yVEut_}C!`?^6ځ"qRM** 7D-瑒kX]`=J02ؖh"u=t$'mQCgAL 5BL&qxÛW9:"良 007AXmKb˜ERz(+,D5ZcAS8jW8" B~pEi2P1DrAlvrUɼklA]\q6h<0c?E--*[)T'҂q S鹺QXJ g>=cfZ,O"3d>ӭMM5D#JhZ_aHo(*[Gȷm c ōu@Y8;MTRTphZ&*`M.'Thk}Vf)ӗn} ~\/:"rhƋ$`vjETqU33u?%idN~]VX8AoI߁Nq?]M5 B 4sׄDAuvkaJҪ>vlDQBЄ.١B7vUݣʫ C[ﮈ#'X2s L:0*)c,qzQ8|:wJo 4ۯ LuP7^j_w̌ɠ*'_K0-TQjlcѽzG{:>ͷ١{{tLL# tkp+_Gt4bՂ%wJzN_wl{@ɗ #pa2;tWe( mU;ɻZ'vB5U!rB#e0#[r.6qk|,1yD|kzVQ^S&g.uE&IC0*וQf&S9#c8 LF5I8xӨ"A6A5ױpDkVZLu+؋7T2 o ͦR1Ilk8eʹlA2nk=VI3  Gk[wtCG=ipgC@P^-]U%3ѵ=r#CaSw9TeYgWjk$T'̓E (4#i.5vW\|"xuLZROә. FK-M-]BfhË ա45|m 4A9!a֍sSB!oWہcZ/Q~XY: `M^xM)rh׏_KIU#}݅bTD?yQՉ]ɢ׶ٳS [`o[5? Pb,f>G}$oq* -#-5DD \EV"~ ]Zl?b? ݏ\i1Νf, Y:ܔڠ͑eyP@NW?{BkZ"Hx_D?,&D=ϟL*򴙊])LE}y?FsУ a rDfB=(R I/OpMa Ʊendstream endobj 145 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1102 >> stream x}SOSw L:nmuX4|bG mm) ,X@ s}N)uid8uq6e_XXN$'I$I$mZtY$B W)7AH)w2"'ϡ$;+ fP-p1\ nR[獚|UԼ^%lIT BŋM&SJ_g0LAmKxcK6 \JsO=I}q4vXD#,}-ew~gМ7,MT."S'u$TRnV"&mz:G^\ .G&@ .t05ShAeObo+\[GBCRkۿS; /N<&@rcL0yţ?XoPh|6BR(Q[40OU;$t=kV˜bR2wJa i+(K}endstream endobj 146 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1259 >> stream xmTLSW~ 7eeS'*L(Ù`:M8-XhP-J)RZpKĺ Ͳd?MܒGs%kq?|9߽$'"HL+(߹33#(,&%"Y1m$8~I|I*jNA'' 1IV[8Q,WKWH3ץK_ȖZeL--rL *E\R7J5׬1 e*jN["]jPBNnz;2\:ETZi_UYs؛IK" b`"D qAGm})K'vo+BB""‚~Rn3'eE:T a8NS!8Ǟy^n:.X|X[$J~/B~7%"Û_a1lAx9I=^la; v%퉢_%@ Flw[x)[*J /GQ5(U@1#T`h^<;nUU2mb,4[h./sԶ=n?tҁ~uҲ$̝uχ% NhXX&| ք = VGQSCn`NhO{Rv6lK4>%FSsd-9j.hv4oT}VN&ܽpGop^YyxS`_dl33}r5[Q9vs+X3B!9R(**9dfEP|`=޺f>L]hPMzYԅ8fncZUooe>T̀Q$kp+v#z~g*ŇF|ZΚ̒ NnhGZ%$1wьop@kmk5s6kލxf6Pm@gcm_%?2št7 g5^ (ɑQ҅댳6mvOnZjmOI> stream xkPSOWJ]td֞׊UѺVgkwEZEV(@r AZwٮRܺSvvf;~i?s>?y#!9%D޵D-9 ؂Տc qÛ9ĥ?9o|O^ݜ,SȤ*񎢝⤃+޻gARR*TrYyLxT:{ZUX%WH|WJg$JFR,H^VHZ$+U8E^,QT+JX"-+ 4" 2l(q8N"RTBȩ%>1^O[QmtTt^Tg W/@dOhQy\cٍvGz8rm!^aNM;B6FhpV4[QsF`"iW;)٨go@f-b+_3y}#d41q |"Wml\}.ePX P.WL;[hF iU%ht=4zyw-Ս)_ 3cڒ4!cw8.^Tjk- uhGZI!c]_G-e>c#+d-"!x',B؃5H/;Sdc2V2?//мO|&I- [C=٢l\鶂 4Z@U}l4sNG~)p:OؒX,Ϗv*3(TM SN0> ^&QgA/8txmU9lR{5=M=$Sf5h9`CwwtfR[^7;hWkPXz+>+J0"MӺ[ѿ]S>Ѥr"wn2xJzC oV*kNSt@v>E\Kcd}~1kKh^QWUfdLXRY ([3=y=Ա@{y®A4.IެX(di|z$OfHa%Rq\xll'Wvn7ɬkU{ҍup-CeǍ+8pLDVM\HP0|92Jh$dP.` hoifn9N7vԩjm]*"&yffn\C\{4tCJ/\mXϿI >#2^H= (Ӷ0鞠9ӀqŦa_>6m`Mhj\!\E֕8f0U2VFdow\Lmj:r?8W^h?|V~1yXgDBܢW7 ^YA{%%f1!+R::ɞϹT`4jird-z *1U~6sR\0NCn4n7& k7X4A͍Q'G Ia3'` |±}>@mqqOm")endstream endobj 148 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 321 >> stream xcd`ab`dddu 21T~H3a!.k7s7鉶 ~(Ș[_PYQ`hii`d``ZXX('gT*hdX뗗%i(gd(((%*\"s JKR|SR Yt޽M3~_+ۻsO/{Vw\B ۡ݇f<ʛUg+[yNƾ|Փxxe` Kq'endstream endobj 149 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 2754 >> stream xV TSg}1{*B5][3Jŵ *h !!} % l( "*NmmcLmuΙЎsNv&/''~?sq8?~q\` pO.x9_&xopJm"!U+_:_x"ZX%nbH;Ȅ!X:U8{TNXfHP3_UKD*Y-ܠW bl ]? yBZnUDUM[HP%E)Q46D&?i!mv`oa!N,ۅa؛zlm6aAﰭ6LM1o% +L'Nqݖɽʝ+LX6u⦉/{^#e@{t`-9̥l&u#tO|!; 8Cups69JLE>D"9fF=C@ɗ=gz]-n&(dhE_ȰOAn(f؇׃! _^z|v>GhabxNC958v0P N@],.p`CYa:pz Pml"T,Zfͷ/:Қ<Fuw}x&||m7.`GDAf-tkT:>MD|Д92BÓpf UsO_W"|J%;,pD-VommFn.Fk蠩8'4_/;n5Gkq(s*( +o0du2s,oܺC$S֑73]K+͵X3;חR, 2 7UL b6koʋ,K׮hG%k+Eahﺇe*ߘ@T@q {ly0zn3H3mQR錹zBӂ3nՃW/_)B2d#|^G8[[=%Jh8|s2]9>gȻf.A ꕶh:NYoHR<2wS/@ɜQ½ZSKh#Bl0C1x jAM)ă-֥ _s} Sqz [ڍ# Y-àlPa״#v{ך}x{5H"~zKpABD+(g92[ZcSMmc"Jx!AkB ktHvC0 th&r>"箑߷y惡3cTʜ AId^ t#=x}KR!j<4o^꛼ R!6())=6#0zw|ϐI]Tۃ fc -mTۘT*(ecZhlIbmvf+PL nCpb4(CR3ؽf.Kcdr& eVx}f_)>4I'"#RD5(݆wYP}ƓumA肓MbK:PBG̑Xz 0$3[?4=ݶjofY'D,@iZ= 6{}6c=Lg^`|~Wb9'[W@ bg.6pI.Bal K/+<\k'd Q#ODRCA)?8I7U4v\cWn2Ja&ҭ&i_w^(;ڇ7 c}`>W8VሊJ 7\*<,0RJISjXzT #&ME? ^L9i >xsJ["kI9r1|]drV5Mf j5}Cˬ&ې7S*RP데G* ap y"lMezm Q.=tx *Ye(脀]!A&6ejU||&ŕ$Ȣfet2i?+jqOyv_0Ũp$+qjwYj~E3W- zWDX#匁D5V3)s̙J#`Bq ZFK1:;go%Jl8Yd%FtDE[W^*?;^vW5M)gw> stream xmT{Lwp#v`B61_0eN(+* i+|+VJ -:6scc1妋Z4&ӌmɶl[?vldr{88Ndlۖy/< OD O@#t2l:YB"yG-2ЀL$~yvxeDFm>t-EHkΣcLrMU]P eNc ;m̙݁zޮN_8W>}I5!v tA7([ú(OW=Vot  |md~r]̿{F81;Ldk\ѓfheۛrHw)f抏/~^Ѽ/n澼ǯ#ϸ / ?(?FHϨC_SS[ #[X-&~aNڷ3mDs]o:56ʣxGarQ>'ƽKOJ#לa&vz;H}8?_#l48]:ƈJI澪=A B)m,ΰ`hT43[}tR}{9KGߝ۴4/ۿ* cT,DZ -s)IbQ1adtڸ-~]d~Oe3ͽgΨJ +<q8Z%yc',֣bT w{.9|Ѷv8cn+j+峔yn><;4F}?nKU@M&[ݱF%p^aڝmڥ\UXSgkl{M]?sk=@I8z %ԠίUtZuC-M4||T~FB4@N&)duNB ?Dϊ1oIendstream endobj 151 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 328 >> stream xcd`ab`ddp 44U~H3a!3k7s7ﻄ'~%XP_PYQ`hii`d``ZXX('gT*hdX뗗%i(gd(((%*@s JKR|SRYBt^}ω33G[7]z}r[~kb}vEly~_d}{O!lYwVWG g/d4mn9.<'yx.x:endstream endobj 152 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1246 >> stream x]R}LSWEx2?hGyc٢ S1C-A4s: <*Z$ T?&%n#[Ř1s.e[:]s.ME(c2WnL]8i,?OˬJNT`_}S ^ QG)D2=өxk:zgZN`ETnI hBf)o3\^0zA%zKFA/Xp8K[l7p`r2޶/VYV_se|dZJvqٖbf.~a2&^|poKMe rڅJ#$`򉢨ع/;}Y>OtzҢJRwou O6wqv <TIP-0':-pq}^/1kwǪ%"kLlLH߰`.\Ynpz=oeD h d9A`$Wjxk}IGV̨=>he䛊,D㱐)P!R">W6qd ] ґQ6f~x},5>vP(U7^)_ ~|W/hwNe@N *.޵pׁKV'4)ֽG؈&wWdvBreP*+yy+OSWD?m}?ГY6yE5 L b&>.VkStIZE d@Ҁ:K:0T--O;'P$v<.V؋Gv1nͺIxdOJ=8:xZ'i++EВ;d(9":$ލpHۅSg -n 6Bs3%SJ~mbLIޗCd+n;]Q *]g'&4^ "("d5(ASͭ>4iG1 1QŀiT*猨,)׀*swv.g]VzFGCDD21#Kz wKh=c,qǜz.N;5ikW4rDendstream endobj 153 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 503 >> stream xCMMI8%  `^YUnsCopyright (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 154 0 obj << /Filter /FlateDecode /Length 14144 >> stream xMu+OfhAl5,ɂWd^b[7H,>%YdU]*8ۯx:_?/q?yo/qܳ㣞7>恛O~/q?|+W+k[k~ïy8Io~~_O,c^o<߾T5?~ O?EqxzW8/K?K<ڵrk/(;w8,Vˍ#y%O%G-GAWic9T^rl-e;ZR C-VA:={^w=՞M_*{}>_5l-ǟ^#Qc̏h.;~ُU:>ξq+ŭQJ }ıShU?Ώk@cBWAPՠDX,}CDphǷNu{)= ʍC 9KUF(7C9⬈8xp\Rn9΃hHGQp"h]uGQVrT+*jAᣉ*:BA=UM n JtPOTcJo3%#ӥZ2U+W^ ug>Aƛjt8U6{vyPWL>jE#Qѫ8qsyVQ N^MoFZNEF7wBtC u\O%ΨYUoz',V=g.7J(^(P䊑kECP1V'F!%U/zS^ſNDzė%ʂh_SeʨPp+Z|##ޢ;^RES?tY & CX :Oӣk- I=zV㳹o nQ]c>ZQ}c:իCWJQ;XC7b0\ozpF%~T@hHhI= %ER(C#WI*}Ý҈`BQ4ăYP#75Z,9υŚw#zVȆԪKڈ7F=u*R52~4f(|McjM%:V-{uJiF@씡|T.s[V䫺ۢ _U wA k0s/HXUwRSʩGz|KkWoIGւL)Cc;P]Z$SgEE1eJ.Յ^J'V@Zϧ5KAZ|fFu䧺ÂUZJcS2uVKB!zyI`*HWC٪ u"]z)HWO]fD'zR8R,OT>ؗ?s<4IKA^9ڮZ4KY)Uenx5z멠+C?)Lw rT"GboȟI^z›M#?éL/ysj^K&[ 4_ nTTI tj*|gyjB)BӪ U rԵ;55tjBSSQׇ}:55z ?PZ!rjBgNM(,Ҩeȧ4qu4T/&7FMPW[YSudքr?"&KP5T4ړYS1Tbc42kYJ8n [lȮ [BqE[ʩ f {.+5D( QƆ̚PNYϥ^M(]pz5Sc"{5^MJDPP.mՄzE{@VM([Ӫx9 PNJ[55PzjBiNՄR ޶}PnwiN> ; 55\ɨr[QGIlԄEڨz25! ߠv Pnp;53ȩazX*uYR|1vjNM(Y2qTw7[5CY5̼CY5Tm0&۪sJUHPdSuڻl ;5TtjnՄҪ eWCe u}U/w=Igky{E n\olB;o\/Jb%[kJ(w=x6x~m2"AemXAA/^ZBzlEޤ4|[;Zig؂oȷe0=ERoC.{v3r*r}',ӷ弜eqD0IM_'E$./:-MNw;/ /|Xr"`Y~|+Ig9/<*-W勈W+H׷k @Z@lknZ:Ɩ/Ω1 Ƿc>5/?$ސoo^Koo÷m3Bu{;\U {QE>1b{]vo%mZ۽{ײ{^{{۝vo Q A:^( lB\Qb Kb֌6US*C",= qlB68ǂ8¨l8xqJA g^=қ㠵$}d\o3\ gbC$}:]Z`3 gz3By^ rc[*-ș4&1Ǚȹ83*8hɃqKK{ryxu8)qtO3 70˙ؐ3OHdED?r}('f9Pھ®l2bt7'2 ݭ<>'{<^|]U7cB<. *ޠxEO+ jhݷU@vEu$ Tο'g7l |GӽrDnмc:<=/ct &@&7EnЕ464cD7#=Mia'A(^c^Hv^"vaěݼd7PR#!-VHv. o0x_+ Ѱ7pvLxʟC1 A&aReEM0d7bbx`p oߩe&AHxd| ~ JH39V:ax52G[5,;U_ \;L', %? bX}찐 eX2IR7.d+.dP'1dEf" q*ggb؈ Br?sÆ!蛈a0\i`\UR8 { {a(Q&/d?k rPpa;7ȍӅ #Bv}Dž ;-d6_c' C8`!1h!6djN C9L Cq^N(ZMϑ.>^!CQfTJO'THE&Q!CB* wP?Y!TĤ yL:П&d|uB|JޙK0'|=|\tQUF9+CINk xuqBw}ݘ8!ımg -qB6/bCѤ{sB6&u(NW'D䟂L R˳5$lLR.MZ03_T ( ߛn̐K J҂J bT}+`W|63B4RVƊeT|bAC5}ޑА[!4d44lتvpkΆls_ո+h!; -3l^Ffu.fX _Úds%0d'Y IĐC;:C[ Yzp!8^^%\.VUȸp'qktq!Ǵʝ `^r!rmHӊtBFBxL  D ie R96Zg<'Z1h!OCBFоB"vLE ŶL 91B:lP ^cZ(CM¶Bbor`!njlpI CDʤTN#Z ؉rKov haӚ$x+DN݊LƗUPۋR8Pz+*r!'TH#*|ej n )*bN)THE/YQ!kG4\e%+ [S%*"*iTH*dڪB8 R5*}7#B*j/F/ϨJ-ӨJM*b (THԉ yn RqɵNr1RУ0= %y!-};a2`}V3mqwtBz徼ӣ!^}zx,vXE ;O]tz燁ZUrEzyknloa-WbvX;ki찖2;';e1HC(z m!NlAbL$hKzX/om$@&lC~X`,AH|bnLćyDM(Va/+҈$^_(~X䇯ULתQUՓ|jƀVrr{j\r{jv!oB F쥫 i GDDӊb=u1FC/A>m(!a-/(|VM1!ʯ=x{HM֒ I|v{D68]!JC kM4*!YwqqƇ(Եoɂ *'AD2B5C,H&u}$ bj^2V=d&UAruJiBa'$BD3NX" 1fF̒L_5 ""\D4{mDj0IK̷bY{&A,87Z'X^1 v枏&D!t2Dz~KY Տ'C|d"s0 ˕ \Fzm ˇZgz$P"(⦘!3@E MirC  +wUNvO I|5+ "B H*D vrC&^Mx]d2&CD}&b.>hze iW#Y?*D!%CDKf+.XP b b;D l& y=,%?18GD'v>8":: GD҈^(P,61"=cDt1"#" >9bFEoU5[$_Q6I$Rڗ2f&J&4K5W%V8X|~(;U%BNf4J-%J3/3JT!Q":YMZHJ!K Kz$gKH(Ib $bܦzeXZ~.A""z$&F2r#"6zE1+~&F,&3FDhYbDxcĒ/O/j#3Æ,CHXk/ #3^ihiYօM5)"L_". "PJ ڏ4!bYۏ&Dw۾0lo7}H*MˑS"BQZ&E;T$BP ʱ/=? OSxS휦&E|[R'E|1)b,e>(bY&Eeˆxe_uHŸ mx^.hX!ˆ#^gQbDTeIKn0"jp1XFD%j2cĒ X-c_tEr-KXNϯ\-nX!FħŽ#kpƈl E+$Għ}sDtK8">c[u~d^ $ً\ %jbkdX0LDz/ &b]5&#>P00s}Ē,FH &.CrDۄ(OaA5^0xIb^ڵH"Fs_u(6U4:(Y6JDD,X(vc _(X(zF_}㊾!oN}D]ɢ mw}'a2pD㊫a[yh ~FOr%BQ?N nt|q?T=}FqxGqGzvJ?<1~׋ۋ}Ǽk^Eh^Ŋ~6~Ͽ#./B:=|/?-U/׿Ox*Sg]_i[ԯs~i__q(^ݸ6ժnx{^%҆,Ak|}nq\௿DdF_?EJQ}D :|`9endstream endobj 155 0 obj << /Filter /FlateDecode /Length 3154 >> stream xZYoIH^zOq"@E0dY4cKz>_f:wz"wd'_|/N.W;Y[kW;8M*Υ&VkRD_kT$q¼BH~1~p*13L&³kbJ4AWl8cdH׍C\?{zM {aar8('8KiaVS9. nO(A!!7k> 4a2;[Hwq@rDu4HmQ["'uE [  `D Z%mMv3̏j,N> .Xʔ<R^B\H WYF0B 䜧Ai(OvCC "ք8 .aA1|pf}!Ц6onyDle3ŗSN&,ҩ)r,,PC,#i5 Fj: ׃,gM[wTl2IlUt`lZ'D}ZgOhصb v)H`R. *$/QAyEGNLYBZpͨ6C2c"Gv4vڵ9r~ʷeV u[`EP'lBT)DkdH,HhR #Ϲ7#6aiReiʝ;KWk`|Rٵ͹Hqd؆CU|B ۋU3\ oD}Y7˞lPΥF05PŒ*M! 8T\(/j!(11T$nVt 32AC‚k0j) Ԉ0k:`- ^""ccJ8yB!F 6zI"P 8T:J(̎p;/dՒZ/%]p"vcPWK`S=o`+ds_@ck'?;X}B G0"4UNrjCp_S8` UgJuSh2C_l :لe_? ")t>jz7+&'e#hp̢_Gg^1m>CEC #d-'2WbL*0販jThKA, "@BEru2$. ^zB/]}/xMkS W4t)˳%uY@ZQ*;ӿ W'I= CTMgz8> A8 vvo`@R#CN)_;S=,@vw$UtV沙URIW5%@2r0~f3 2D(2tD2}'*x3A(%"_%Ӹ Ln-Pގ|l4:)u-cעpPm!uN~0/[g ( obYn?*\ {a9I ndH],ӒOf83STB֌U{B.C(I4")ޟ|`*;{:.KCߡn*Dtٳ"AwދIxFMx???_Y;6oDV66E( M6eIW7NJ3̝ z3{L;X 'H{4(:HG:5fXZMi7ux8aË:˻(O𼶌`gu8b|=rendstream endobj 156 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 157 /ID [<1537692baaea179b92fd7fadc55af999>] >> stream xcb&F~0 $8JҜ^ "!O0xȖL5 R U D2`w,XX,A$+7d)Fo`` Dr, "ydA$[X"K0;DZta" endstream endobj startxref 94929 %%EOF gsl/inst/doc/gslpaper.R0000644000175100001440000000465112251674041014547 0ustar hornikusers### 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.ac0000644000175100001440000000266612627531554013367 0ustar hornikusers 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` else AC_MSG_ERROR([gsl-config not found, is GSL installed?]) fi AC_MSG_CHECKING([if GSL version >= 1.12]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ #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 (major == 1 && minor < 12); #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.12]) 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/0000755000175100001440000000000013033375105011644 5ustar hornikusersgsl/src/hyperg.c0000644000175100001440000000646113033375105013315 0ustar hornikusers#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(double *c, 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_hyperg_0F1_e(c[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_1F1_int_e(int *m, int *n, 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_hyperg_1F1_int_e(m[i], n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_1F1_e(double *a, double *b, 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_hyperg_1F1_e(a[i], b[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_U_int_e(int *m, int *n, 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_hyperg_U_int_e(m[i], n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_U_e(double *a, double *b, 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_hyperg_U_e(a[i], b[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_2F1_e(double *a, double *b, double *c, 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_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(double *aR, double *aI, double *c, 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_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(double *a, double *b, double *c, 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_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(double *aR, double *aI, double *c, 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_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(double *a, double *b, 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_hyperg_2F0_e(a[i], b[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/qrng.c0000644000175100001440000000533113033375105012761 0ustar hornikusers#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"); }; dimension = AS_INTEGER(dimension); result = R_MakeExternalPtr(gsl_qrng_alloc(T, (unsigned int)asInteger(dimension)), dimension, R_NilValue); 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), duplicate(EXTPTR_TAG(r)), R_NilValue); 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(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_gamma_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lngamma_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_lngamma_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lngamma_sgn_e(double *x, 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(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_gammastar_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gammainv_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_gammainv_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lngamma_complex_e(double *zr, double *zi, 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(int *n, 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_taylorcoeff_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fact_e(unsigned int *n, 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(unsigned int *n, 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(unsigned int *n, 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(unsigned int *n, 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(unsigned int *n, unsigned int *m, 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(unsigned int *n, unsigned int *m, 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(double *a, 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_poch_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lnpoch_e(double *a, 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_lnpoch_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lnpoch_sgn_e(double *a, double *x, 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(double *a, 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_pochrel_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gamma_inc_P_e(double *a, 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_gamma_inc_P_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gamma_inc_Q_e(double *a, 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_gamma_inc_Q_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gamma_inc_e(double *a, 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_gamma_inc_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void beta_e(double *a, 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(double *a, double *b, 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(double *a, double *b, 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_beta_inc_e(a[i], b[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/poly.c0000644000175100001440000000027013033375105012772 0ustar hornikusers#include void gsl_poly(double *c, int *len, double *x, 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.c0000644000175100001440000000076613033375105013500 0ustar hornikusers#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(double *x, int *n, 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.c0000644000175100001440000003761113033375105013275 0ustar hornikusers#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(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_bessel_J0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_J1_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_bessel_J1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Jn_e(int *n, 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_bessel_Jn_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Jn_array_e(int *nmin, int *nmax, double *x, 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(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_bessel_Y0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Y1_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_bessel_Y1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Yn_e(int *n, 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_bessel_Yn_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Yn_array_e(int *nmin, int *nmax, double *x, 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(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_bessel_I0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_I1_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_bessel_I1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_In_e(int *n, 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_bessel_In_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_In_array_e(int *nmin, int *nmax, double *x, 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(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_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(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_bessel_I1_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_In_scaled_e(int *n, 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_bessel_In_scaled_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_In_scaled_array_e(int *nmin, int *nmax, double *x, 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(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_bessel_K0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_K1_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_bessel_K1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Kn_e(int *n, 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_bessel_Kn_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Kn_array_e(int *nmin, int *nmax, double *x, 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(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_bessel_K0_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_K1_scaled_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_bessel_K1_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Kn_scaled_e(int *n, 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_bessel_Kn_scaled_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Kn_scaled_array_e(int *nmin, int *nmax, double *x, 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(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_bessel_j0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_j1_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_bessel_j1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_j2_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_bessel_j2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_jl_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_bessel_jl_e(l[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_jl_array_e(int *lmax, double *x, 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, double *x, 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(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_bessel_y0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_y1_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_bessel_y1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_y2_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_bessel_y2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_yl_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_bessel_yl_e(l[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_yl_array_e(int *lmax, double *x, 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(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_bessel_i0_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_i1_scaled_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_bessel_i1_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_i2_scaled_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_bessel_i2_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_il_scaled_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_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, double *x, 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(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_bessel_k0_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_k1_scaled_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_bessel_k1_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_k2_scaled_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_bessel_k2_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_kl_scaled_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_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, double *x, 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, 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_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, 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_bessel_Ynu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Inu_e(double *nu, 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_bessel_Inu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Inu_scaled_e(double *nu, 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_bessel_Inu_scaled_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Knu_e(double *nu, 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_bessel_Knu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_lnKnu_e(double *nu, 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_bessel_lnKnu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Knu_scaled_e(double *nu, 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_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, 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, 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, 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.c0000644000175100001440000000273013033375105013632 0ustar hornikusers#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(int *two_ja, int *two_jb, int *two_jc, int *two_ma, int *two_mb, int *two_mc, 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(int *two_ja, int *two_jb, int *two_jc, int *two_jd, int *two_je, int *two_jf, 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(int *two_ja, int *two_jb, int *two_jc, int *two_jd, int *two_je, int *two_jf, int *two_jg, int *two_jh, int *two_ji, 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.c0000644000175100001440000000241313033375105013100 0ustar hornikusers#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(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_debye_1_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void debye_2(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_debye_2_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void debye_3(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_debye_3_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void debye_4(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_debye_4_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/dawson.c0000644000175100001440000000070413033375105013304 0ustar hornikusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_dawson goes to dawson. */ void dawson(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_dawson_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/lambert.c0000644000175100001440000000140613033375105013437 0ustar hornikusers#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(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_lambert_W0_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void lambert_Wm1(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_lambert_Wm1_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/transport.c0000644000175100001440000000242613033375105014050 0ustar hornikusers#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(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_transport_2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void transport_3(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_transport_3_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void transport_4(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_transport_4_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void transport_5(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_transport_5_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/rng.c0000644000175100001440000001000513033375105012572 0ustar hornikusers#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), duplicate(EXTPTR_TAG(r)), R_NilValue); 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.c0000644000175100001440000000257213033375105013624 0ustar hornikusers#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(double *a, 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_laguerre_1_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void laguerre_2(double *a, 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_laguerre_2_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void laguerre_3(double *a, 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_laguerre_3_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void laguerre_n(int *n, double *a, 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_laguerre_n_e(*n, a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/synchrotron.c0000644000175100001440000000137413033375105014405 0ustar hornikusers#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(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_synchrotron_1_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void synchrotron_2(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_synchrotron_2_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/vector.h0000644000175100001440000000062113033375105013316 0ustar hornikusers/* 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.c0000644000175100001440000000350413033375105013143 0ustar hornikusers#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(double *x, 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(double *x, 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(double *x, 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 log_erf_Z_e(double *x, 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 log_erf_Q_e(double *x, 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(double *x, 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; } } gsl/src/clausen.c0000644000175100001440000000071113033375105013441 0ustar hornikusers#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(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_clausen_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/elljac.c0000644000175100001440000000065113033375105013244 0ustar hornikusers#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(double *u, double *m, 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.in0000644000175100001440000000031613033375105013745 0ustar hornikusers# 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.c0000644000175100001440000000743013033375105013303 0ustar hornikusers#include #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 */ static int sf_mode[] = { GSL_PREC_DOUBLE, GSL_PREC_SINGLE, GSL_PREC_APPROX } ; void ellint_Kcomp_e(double *k, 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_ellint_Kcomp_e(k[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_Ecomp_e(double *k, int *nk, 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, double *k, int *nk, 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, double *k, int *nk, 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, double *k, double *n, int *nk, 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(double *phi, double *k, double *n, int *nk, 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++){ #if defined(GSL_MAJOR_VERSION) && GSL_MAJOR_VERSION >= 2 status[i] = gsl_sf_ellint_D_e(phi[i], k[i], sf_mode[*mode], &result) ; #else status[i] = gsl_sf_ellint_D_e(phi[i], k[i], n[i], sf_mode[*mode], &result) ; #endif val[i] = result.val; err[i] = result.err; } } void ellint_RC_e(double *x, double *y, int *nx, 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(double *x, double *y, double *z, int *nx, 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(double *x, double *y, double *z, int *nx, 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(double *x, double *y, double *z, double *p, int *nx, 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.c0000644000175100001440000000343513033375105012610 0ustar hornikusers#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(int *n, 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, 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, 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(int *n, 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, 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, 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.c0000644000175100001440000000323413033375105014116 0ustar hornikusers#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(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_gegenpoly_1_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gegenpoly_2_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_gegenpoly_2_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gegenpoly_3_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_gegenpoly_3_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gegenpoly_n_e(int *n, 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_gegenpoly_n_e(*n, lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gegenpoly_array(int *nmax, double *lambda, double *x, 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.c0000644000175100001440000000535013033375105014257 0ustar hornikusers#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(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_fermi_dirac_m1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_0(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_fermi_dirac_0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_1(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_fermi_dirac_1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_2(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_fermi_dirac_2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_int(int *j, 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_fermi_dirac_int_e(j[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_mhalf(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_fermi_dirac_mhalf_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_half(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_fermi_dirac_half_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_3half(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_fermi_dirac_3half_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_inc_0(double *x, double *b, 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.c0000644000175100001440000000702013033375105013447 0ustar hornikusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and _e from the end. */ void hydrogenicR_1(double *Z, double *r, 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(int *n, int *l, double *Z, double *r, 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(double *eta, double *x, double *L_F, int *k, 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(double *L_min, int *kmax, double *eta, double *x, 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(double *L_min, int *kmax, double *eta, double *x, 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(double *L_min, int *kmax, double *eta, double *x, 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(double *L_min, int *kmax, double *eta, double *x, 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(double *L, 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_coulomb_CL_e(L[i], eta[i], &result) ; val[i] = result.val; err[i] = result.err; } } void coulomb_CL_array(double *L_min, int *kmax, double *eta, 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.win0000644000175100001440000000044313033375105014135 0ustar hornikusers# 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/legendre.c0000644000175100001440000001767213033375105013612 0ustar hornikusers#include // for size_t #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. */ void legendre_P1(double *x, int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_P1(x[i]); } } void legendre_P1_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_P1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_P2(double *x, int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_P2(x[i]); } } void legendre_P2_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_P2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_P3(double *x, int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_P3(x[i]); } } void legendre_P3_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_P3_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_Pl(int *l, double *x, 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(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_Pl_e(*l, x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_Pl_array(int *lmax, double* x, 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(double *x, 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; } } 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; } } #if ((GSL_MAJOR_VERSION < 2) || (GSL_MAJOR_VERSION == 2 && GSL_MINOR_VERSION == 0)) void legendre_Plm_array(int *lmax, int *m, double* x, int* len, double* out, int* status) { 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)); } } #endif 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; } } #if ((GSL_MAJOR_VERSION < 2) || (GSL_MAJOR_VERSION == 2 && GSL_MINOR_VERSION == 0)) void legendre_sphPlm_array(int *lmax, int *m, double* x, int* len, double* out, int* status) { 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)); } } #endif 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.c0000644000175100001440000000737313033375105012766 0ustar hornikusers#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(double *x, 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_airy_Ai_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Bi_e(double *x, int *len, 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(double *x, int *len, 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(double *x, int *len, 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(double *x, int *len, 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(double *x, int *len, 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(double *x, int *len, 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(double *x, int *len, 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(int *n, 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(int *n, 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(int *n, 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(int *n, 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.c0000644000175100001440000000570113033375105013322 0ustar hornikusers#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(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_expint_E1_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void expint_E2_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_expint_E2_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void expint_En_e(int *n, 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_expint_En_e(n[i], x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void expint_Ei_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_expint_Ei_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void Shi_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_Shi_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void Chi_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_Chi_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void expint_3_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_expint_3_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void Si_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_Si_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void Ci_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_Ci_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void atanint_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_atanint_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/multimin.c0000644000175100001440000001521613033375105013653 0ustar hornikusers/* An R wrapper for GSL's multimin family of functions for minimizing * functions. * * Written in 2007 by Andrew Clausen */ #include #include #include #include #include #include #include "vector.h" const gsl_multimin_fdfminimizer_type *fdf_methods[5]; const gsl_multimin_fminimizer_type *f_methods[5]; static int initialized = 0; static void init() { if (initialized) return; initialized = 1; fdf_methods[0] = gsl_multimin_fdfminimizer_conjugate_fr; fdf_methods[1] = gsl_multimin_fdfminimizer_conjugate_pr; fdf_methods[2] = gsl_multimin_fdfminimizer_vector_bfgs; fdf_methods[3] = gsl_multimin_fdfminimizer_steepest_descent; fdf_methods[4] = NULL; f_methods[0] = NULL; f_methods[1] = NULL; f_methods[2] = NULL; f_methods[3] = NULL; f_methods[4] = gsl_multimin_fminimizer_nmsimplex; } double f_wrapper(const gsl_vector *v, void *params) { SEXP state = params; SEXP f_body = findVar(install("f"), state); SEXP rho = findVar(install("rho"), state); SEXP x = vector_R_from_gsl(v); PROTECT(x); defineVar(install("x"), x, rho); UNPROTECT(1); return REAL(eval(f_body, rho))[0]; } void df_wrapper(const gsl_vector *v, void *params, gsl_vector *df) { SEXP state = params; SEXP df_body = findVar(install("df"), state); SEXP rho = findVar(install("rho"), state); SEXP x = vector_R_from_gsl(v); PROTECT(x); defineVar(install("x"), x, rho); UNPROTECT(1); vector_assign_gsl_from_R(df, eval(df_body, rho)); } void fdf_wrapper(const gsl_vector *v, void *params, double *f, gsl_vector *df) { SEXP state = params; SEXP fdf_body = findVar(install("fdf"), state); SEXP rho = findVar(install("rho"), state); SEXP x = vector_R_from_gsl(v); SEXP result; PROTECT(x); defineVar(install("x"), x, rho); PROTECT(result = eval(fdf_body, rho)); *f = REAL(findVar(install("f"), result))[0]; vector_assign_gsl_from_R(df, findVar(install("df"), result)); UNPROTECT(2); } void free_ptr(SEXP s) { void *ptr = R_ExternalPtrAddr(s); free(ptr); } void free_fmin_ptr(SEXP s) { gsl_multimin_fminimizer *gsl_state = R_ExternalPtrAddr(s); /* following conditional suggested by Brian Ripley; under Windows, the call to free caused the package to fail R CMD check. Omitting the free results in a slight memory leak; this is stated in Multimin.Rd */ #ifndef WIN32 gsl_multimin_fminimizer_free(gsl_state); #endif } SEXP multimin_f_new(SEXP state, SEXP x, SEXP method, SEXP step_size) { SEXP ptr; gsl_multimin_fminimizer *gsl_state; const gsl_multimin_fminimizer_type *method_; gsl_multimin_function *f_; int n; init(); assert(isNumeric(x)); assert(isInteger(method)); assert(isNumeric(step_size)); n = LENGTH(x); assert(n > 0); assert(INTEGER(method)[0] < 6); method_ = f_methods[INTEGER(method)[0] - 1]; assert(method_ != NULL); gsl_state = gsl_multimin_fminimizer_alloc(method_, n); assert(gsl_state != NULL); f_ = malloc(sizeof(gsl_multimin_function)); assert(f_ != NULL); f_->f = f_wrapper; f_->n = n; f_->params = state; ptr = R_MakeExternalPtr(gsl_state, mkChar("gsl_state"), state); R_RegisterCFinalizer(ptr, free_fmin_ptr); setVar(install("gsl_state"), ptr, state); ptr = R_MakeExternalPtr(f_, mkChar("gsl_function"), state); R_RegisterCFinalizer(ptr, free_ptr); setVar(install("f_wrapper_ref"), ptr, state); gsl_multimin_fminimizer_set(gsl_state, f_, vector_gsl_from_R(x), vector_gsl_from_R(step_size)); return state; } SEXP multimin_fdf_new(SEXP state, SEXP x, SEXP method, SEXP step_size, SEXP tol) { SEXP ptr; gsl_multimin_fdfminimizer *gsl_state; const gsl_multimin_fdfminimizer_type *method_; gsl_multimin_function_fdf *f_; int n; init(); assert(isNumeric(x)); assert(isInteger(method)); assert(isNumeric(step_size)); assert(isNumeric(tol)); assert(LENGTH(step_size) == 1); assert(LENGTH(tol) == 1); n = LENGTH(x); assert(n > 0); assert(INTEGER(method)[0] < 6); method_ = fdf_methods[INTEGER(method)[0] - 1]; assert(method_ != NULL); gsl_state = gsl_multimin_fdfminimizer_alloc(method_, n); assert(gsl_state != NULL); f_ = malloc(sizeof(gsl_multimin_function_fdf)); assert(f_ != NULL); f_->f = f_wrapper; f_->df = df_wrapper; f_->fdf = fdf_wrapper; f_->n = n; f_->params = state; ptr = R_MakeExternalPtr(gsl_state, mkChar("gsl_state"), state); R_RegisterCFinalizer(ptr, free_fmin_ptr); setVar(install("gsl_state"), ptr, state); ptr = R_MakeExternalPtr(f_, mkChar("gsl_function"), state); R_RegisterCFinalizer(ptr, free_ptr); setVar(install("f_wrapper_ref"), ptr, state); gsl_multimin_fdfminimizer_set(gsl_state, f_, vector_gsl_from_R(x), REAL(step_size)[0], REAL(tol)[0]); return state; } SEXP multimin_f_iterate(SEXP state) { gsl_multimin_fminimizer *gsl_state; SEXP result = NEW_INTEGER(1); PROTECT(result); gsl_state = R_ExternalPtrAddr(findVar(install("gsl_state"), state)); INTEGER(result)[0] = gsl_multimin_fminimizer_iterate(gsl_state); UNPROTECT(1); return result; } SEXP multimin_fdf_iterate(SEXP state) { gsl_multimin_fdfminimizer *gsl_state; SEXP result = NEW_INTEGER(1); PROTECT(result); gsl_state = R_ExternalPtrAddr(findVar(install("gsl_state"), state)); INTEGER(result)[0] = gsl_multimin_fdfminimizer_iterate(gsl_state); UNPROTECT(1); return result; } SEXP multimin_restart(SEXP state) { gsl_multimin_fdfminimizer *gsl_state; SEXP result = NEW_INTEGER(1); PROTECT(result); gsl_state = R_ExternalPtrAddr(findVar(install("gsl_state"), state)); INTEGER(result)[0] = gsl_multimin_fdfminimizer_restart(gsl_state); UNPROTECT(1); return result; } SEXP multimin_f_state_argmin(SEXP state) { gsl_multimin_fminimizer *gsl_state; gsl_state = R_ExternalPtrAddr(findVar(install("gsl_state"), state)); return vector_R_from_gsl(gsl_state->x); } SEXP multimin_fdf_state_argmin(SEXP state) { gsl_multimin_fdfminimizer *gsl_state; gsl_state = R_ExternalPtrAddr(findVar(install("gsl_state"), state)); return vector_R_from_gsl(gsl_state->x); } SEXP multimin_f_state_min(SEXP state) { SEXP result = NEW_NUMERIC(1); PROTECT(result); gsl_multimin_fminimizer *gsl_state; gsl_state = R_ExternalPtrAddr(findVar(install("gsl_state"), state)); NUMERIC_POINTER(result)[0] = gsl_state->fval; UNPROTECT(1); return result; } SEXP multimin_fdf_state_min(SEXP state) { SEXP result = NEW_NUMERIC(1); PROTECT(result); gsl_multimin_fdfminimizer *gsl_state; gsl_state = R_ExternalPtrAddr(findVar(install("gsl_state"), state)); NUMERIC_POINTER(result)[0] = gsl_state->f; UNPROTECT(1); return result; } SEXP multimin_fdf_state_grad(SEXP state) { gsl_multimin_fdfminimizer *gsl_state; gsl_state = R_ExternalPtrAddr(findVar(install("gsl_state"), state)); return vector_R_from_gsl(gsl_state->gradient); } gsl/src/log.c0000644000175100001440000000331313033375105012571 0ustar hornikusers#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(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_log_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void log_abs_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_log_abs_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void complex_log_e(double *zr, double *zi, 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(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_log_1plusx_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void log_1plusx_mx_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_log_1plusx_mx_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/trig.c0000644000175100001440000000573613033375105012770 0ustar hornikusers#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(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_sin_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void cos_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_cos_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void hypot_e(double *x, double *y, 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(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_sinc_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void complex_sin_e(double *zr, double *zi, 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, 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, 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(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_lnsinh_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void lncosh_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_lncosh_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/zeta.c0000644000175100001440000000402013033375105012747 0ustar hornikusers#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(int *n, 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, 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(int *n, 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(double *s, 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(double *s, double *q, 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(int *n, 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(double *s, 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.c0000644000175100001440000000153413033375105013111 0ustar hornikusers#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(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_dilog_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void complex_dilog_e(double *r, double *theta, 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/NAMESPACE0000644000175100001440000000005012251674014012271 0ustar hornikusersexportPattern("^[^\\.]") useDynLib(gsl) gsl/INSTALL0000644000175100001440000000072112251674014012110 0ustar hornikusersThe 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". gsl/R/0000755000175100001440000000000012251674041011260 5ustar hornikusersgsl/R/trig.R0000644000175100001440000002076612251674014012363 0ustar hornikusers"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.R0000644000175100001440000000056212251674014012371 0ustar hornikusers"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.R0000644000175100001440000000126512251674014013066 0ustar hornikusers"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.R0000644000175100001440000002376612251674014013061 0ustar hornikusers"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.R0000644000175100001440000000335212251674014012130 0ustar hornikusers"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.R0000644000175100001440000000264212251674014012175 0ustar hornikusers"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.R0000644000175100001440000000417112251674014012640 0ustar hornikusers"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.R0000644000175100001440000001705712251674014012713 0ustar hornikusers"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.R0000644000175100001440000000233312251674014013032 0ustar hornikusers"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.R0000644000175100001440000000540612251674014013216 0ustar hornikusers"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.R0000644000175100001440000000726412251674014012207 0ustar hornikusers"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.R0000644000175100001440000000466012251674014012501 0ustar hornikusers"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.R0000644000175100001440000001751312251674014012356 0ustar hornikusers"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.R0000644000175100001440000001046712251674014012356 0ustar hornikusers"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.R0000644000175100001440000001013712251674014012166 0ustar hornikusers"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.R0000644000175100001440000001414612251674014012720 0ustar hornikusers"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.R0000644000175100001440000001337512251674014013660 0ustar hornikusers"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.R0000644000175100001440000011307312251674014012665 0ustar hornikusers"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.R0000644000175100001440000000752212251674014012542 0ustar hornikusers"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) } } "log_erf_Z" <- 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) } } "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.R0000644000175100001440000001030312251674014013236 0ustar hornikusers# 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") multimin <- function(..., prec=0.0001) { 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) { 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) { 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) { if (state$is.fdf) .Call("multimin_restart", state$internal.state) state } # Convergence criterion for Nelder-Mead multimin.fminimizer.size <- function(state) { stopifnot(!state$is.fdf) .Call("multimin_fminimizer_size", state$internal.state) } gsl/R/transport.R0000644000175100001440000000472412251674014013446 0ustar hornikusers"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.R0000644000175100001440000000115712251674014013041 0ustar hornikusers"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.R0000644000175100001440000000277112251674014012510 0ustar hornikusers"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), 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.R0000644000175100001440000000236312251674014013777 0ustar hornikusers"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.R0000644000175100001440000000107612251674014012356 0ustar hornikusersqrng_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.R0000644000175100001440000000730612251674014013515 0ustar hornikusers"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.R0000644000175100001440000003700012251674014013170 0ustar hornikusers"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) } } "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) } } "legendre_Plm_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-m.single+1)) jj <- .C("legendre_Plm_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) } } "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.R0000644000175100001440000001757612251674014012712 0ustar hornikusers"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, 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_D_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_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.R0000644000175100001440000004035212251674014012471 0ustar hornikusers"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.R0000644000175100001440000000115312251674014012676 0ustar hornikusers"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.R0000644000175100001440000000021512251674014012236 0ustar hornikusers#.First.lib <- function(lib, pkg) { # library.dynam("gsl", pkg, lib) #} .onLoad <- function(lib, pkg) { library.dynam("gsl", pkg, lib) } gsl/R/coupling.R0000644000175100001440000000621512251674014013227 0ustar hornikusers"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/0000755000175100001440000000000013033375104013064 5ustar hornikusersgsl/vignettes/gslpaper.Rnw0000644000175100001440000002477512251674014015413 0ustar hornikusers% -*- 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.bib0000644000175100001440000000223312251674014014332 0ustar hornikusers @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/MD50000644000175100001440000001216513033416066011374 0ustar hornikusersb6b5ebb7bc914901ca77bbfa87504069 *DESCRIPTION 43cfffb315b399d106c9e7954f22d91a *INSTALL 31483d04500c9ce2a7050ab516eec317 *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 c036d535ad115094f673b0f5a5a0a3a1 *R/dilog.R ea246eec147354df8f4ec35f944ece93 *R/ellint.R cc8b5050e1462ac3110d9f2d0a77b8a7 *R/elljac.R 63e89748e7421f9d36beced3c5aa41b2 *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 9ba92bb8fe3adac3a30483883f213e37 *R/legendre.R 7ab481dd8fe0647da9d8094073e20203 *R/log.R 374707ac2bfd210766eea40e532726d1 *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 fa13549f84c90eecbc081c4af8e1fa88 *build/vignette.rds 67c9db5dc1a8e12ccf5880ffe206ce56 *cleanup 9a9891f695e4676eb2f69fb50f393f57 *configure b0a09ce66804c989dc28f289db46011c *configure.ac 4f92f503d9c4f423a6e89a9eaf63b63a *inst/CITATION e2b59fe3fff2bcb30599893a7e590f33 *inst/doc/gslpaper.R 3301d42c84eae58199688edf0b89e67b *inst/doc/gslpaper.Rnw 30ec9f5198f1e81db1eedc61af5a41be *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 67ae7337e6876ed2a74502516bb554cb *man/Ellint.Rd bf62c520b78449c16488f54426154a0f *man/Elljac.Rd a718e4a398ac7a2b64d65f1dfb320432 *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 350bca046d811eb9113994dc980a7c53 *man/Legendre.Rd fabe389c3bb31b21bf9988cdd34d0568 *man/Log.Rd 4dedc46dadcd50abb618d91ddd47dbf2 *man/Misc.Rd 1fade6bc68c4fb6240407233f9787b35 *man/Multimin.Rd 20679f03d67f003db906ad6080c14010 *man/Poly.Rd c80c94e5141fde7e2f8dc0b1753bad1f *man/Pow_int.Rd d46471da3247f9e6c798a31e5560a6d2 *man/Psi.Rd 20550c18fc17531e21be84f9ede97456 *man/Qrng.Rd 96ff7fb8a6c5ad43c2084c0dad64cab0 *man/Rng.Rd 3aa9bebddffb9ebb60599b323dcbfaf1 *man/Synchrotron.Rd 43d8d0cc536f8b30a0034a3a338d3bc2 *man/Transport.Rd b5c53e7002df8b21fe5eae10d0b0d587 *man/Trig.Rd 8af97a7a2f2381c6f4eda9226854e0a6 *man/Zeta.Rd 0b0f133ada6daa27c5ee0eef00d04c74 *man/gsl-package.Rd 417be231e3b2ad76fb58f63e6282a843 *src/Makevars.in 3f7c071f1a65529da9c401162d49a54a *src/Makevars.win 2adbf8781af6cb9daaa6dc10db410e54 *src/airy.c 9d9f3a7ab7470189959e645a2de47bcf *src/bessel.c cfc2f52f26529f5162d87b4dba05f010 *src/clausen.c f58e8ead369ee94387edc38f1330ada1 *src/coulomb.c 1a6b4c2639017489ca7757abcd476c8b *src/coupling.c b9e67aa3572a60fc8cfe5651d386a251 *src/dawson.c 07b6bc201b1956c4a5dd90172fdb6cb2 *src/debye.c 5b5cabf6031c19224e7e7ef4ac9e2b6a *src/dilog.c ca96b38cdc06b5c35fee02b26b2bff4d *src/ellint.c bb037c708bd7e7ba735b83b8f5166e0a *src/elljac.c 803c371059fc2b48262c6a611f10e48e *src/error.c 23e873053f5e1544a259ef8444d268f8 *src/expint.c f183cb92f62f2132ebcd6c6e87dadbe9 *src/fermi_dirac.c 34ef890c8b415259143e6cf7773422e0 *src/gamma.c 1c6708c4383e2a01f8ecd829501edea9 *src/gegenbauer.c 42f6f901e8451ca0b1aa6c24b292a3b8 *src/hyperg.c dfa461e5ad77313a206f82f677ee3cac *src/laguerre.c 5c539738e044a51c33f3916873543392 *src/lambert.c 4c21539636e69450c7ab4da6684dc7c9 *src/legendre.c a60c1c9bc368e9c50a8545aab6ca67bc *src/log.c 8768413013d9891c716a3fe0f60826bd *src/multimin.c d108215b94072249889c251a8e9e6f37 *src/poly.c 71feaeeb9d5af092819bec63aeb7e774 *src/pow_int.c da2e2c2995ae699d737da9d234d53877 *src/psi.c 67b89a4fa617eae660b32fd5cfa0ec9e *src/qrng.c 55b3586e6d7df417b6e3f06404061837 *src/rng.c bbff1289bb0e9d8c0ebc7d7de073107a *src/synchrotron.c 1a51f22c165b42a55a43b808c2a713c1 *src/transport.c b5e608445f1e8fa59fcfed76da8dd8e1 *src/trig.c 58ad72acc96459be2e809ba64f4a5331 *src/vector.c 0597d273827001e0b130065ead9c76b4 *src/vector.h 99e7e5ff4af6347ccc272451dc5daa90 *src/zeta.c 47c7066e7d5968a2a5d6d279640fad82 *vignettes/gsl.bib 3301d42c84eae58199688edf0b89e67b *vignettes/gslpaper.Rnw gsl/build/0000755000175100001440000000000013033375104012153 5ustar hornikusersgsl/build/vignette.rds0000644000175100001440000000033113033375104014507 0ustar hornikusersuQ0  Q&&;0!\X$r(LmҮ[k_K1 1)`/ byV ~T6Zmf<+A)`i%:C8<> vI=*Oe~ '%?Aѧ(oeKSɁ3= \.t}jD#a}C/uJwJRgsl/DESCRIPTION0000644000175100001440000000142213033416066012564 0ustar hornikusersPackage: gsl Version: 1.9-10.3 Depends: R (>= 2.10.0) Date: 2016-12-14 Title: Wrapper for the Gnu Scientific Library Author: Robin K. S. Hankin; qrng functions by Duncan Murdoch and multimin by Andrew Clausen SystemRequirements: Gnu Scientific Library version >= 1.12 Description: An R wrapper for the special functions and quasi random number generators of the Gnu Scientific Library (http://www.gnu.org/software/gsl/). See gsl-package.Rd for details of overall package organization, and Misc.Rd for some functions that are widely used in the package, and some tips on installation. Maintainer: Robin K. S. Hankin License: GPL (>= 2) NeedsCompilation: yes Repository: CRAN Date/Publication: 2017-01-05 11:13:10 Packaged: 2017-01-05 07:48:21 UTC; rksh gsl/configure0000755000175100001440000031066012627531607013003 0ustar hornikusers#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 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=: # Zsh 3.x and 4.x performs 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 # PATH needs CR # 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 # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. 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 # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs 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 : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs 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_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. 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" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # 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 } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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 fi echo >conf$$.file 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' 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=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, 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= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="src/airy.c" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias GSL_CONFIG CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT GSL_CFLAGS GSL_LIBS LIBOBJS LTLIBOBJS' ac_subst_files='' 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 # 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=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_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=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_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$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_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=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 ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 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'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. 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 case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } 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 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 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 .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # 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 -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | 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 .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } 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 C/C++/Objective 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. _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" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 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.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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 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.61. 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=. 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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$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 ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export 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 cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_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 cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" 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'; { (exit 1); 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 # 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 # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" 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. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 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,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 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 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`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. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } 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 #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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GSL_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GSL_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $GSL_CONFIG" >&5 echo "${ECHO_T}$GSL_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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` else { { echo "$as_me:$LINENO: error: gsl-config not found, is GSL installed?" >&5 echo "$as_me: error: gsl-config not found, is GSL installed?" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: checking if GSL version >= 1.12" >&5 echo $ECHO_N "checking if GSL version >= 1.12... $ECHO_C" >&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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out 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. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 | *.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 { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* 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" 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #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 (major == 1 && minor < 12); #else exit(1); #endif } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then gsl_version_ok=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) gsl_version_ok=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi if test "${gsl_version_ok}" = no; then { { echo "$as_me:$LINENO: error: Need GSL version >= 1.12" >&5 echo "$as_me: error: Need GSL version >= 1.12" >&2;} { (exit 1); exit 1; }; } else { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_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 test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 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=' 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= 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=`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. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $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} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## 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=: # Zsh 3.x and 4.x performs 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 # PATH needs CR # 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 # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. 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 # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. 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" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # 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 } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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 fi echo >conf$$.file 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 -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' 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=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # 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 # 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.61. 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 cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet 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 ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 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' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. 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=$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 ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) 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. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$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 if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # 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" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; 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= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim GSL_CONFIG!$GSL_CONFIG$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim GSL_CFLAGS!$GSL_CFLAGS$ac_delim GSL_LIBS!$GSL_LIBS$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 49; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ 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[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[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="$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 || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$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 "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; 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 || 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" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`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 || 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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 # 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= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF 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 sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;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 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 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 "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # 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 || { (exit 1); exit 1; } fi gsl/man/0000755000175100001440000000000012251674041011632 5ustar hornikusersgsl/man/Error.Rd0000644000175100001440000000246412251674014013220 0ustar hornikusers\name{Error} \alias{error} \alias{Error} \alias{Error function} \alias{erf} \alias{erfc} \alias{log_erfc} \alias{log_erf_Z} \alias{erf_Q} \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) log_erf_Z(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.Rd0000644000175100001440000000137212251674014013543 0ustar hornikusers\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.Rd0000644000175100001440000000507212251674014013020 0ustar hornikusers\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.Rd0000644000175100001440000000371212251674014013373 0ustar hornikusers\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.Rd0000644000175100001440000000167012251674014013155 0ustar hornikusers\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.Rd0000644000175100001440000000263012251674014013045 0ustar hornikusers\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.Rd0000644000175100001440000000407412251674014013035 0ustar hornikusers\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.Rd0000644000175100001440000000145612251674014014457 0ustar hornikusers\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.Rd0000644000175100001440000000257112251674014014210 0ustar hornikusers\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.Rd0000644000175100001440000000154612251674014013515 0ustar hornikusers\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.Rd0000644000175100001440000000224012251674014013022 0ustar hornikusers\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.Rd0000644000175100001440000000300712251674014012642 0ustar hornikusers\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.Rd0000644000175100001440000000256012251674014013162 0ustar hornikusers\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.Rd0000644000175100001440000000350212251674014014165 0ustar hornikusers\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.Rd0000644000175100001440000000171412251674014014120 0ustar hornikusers\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/Gamma.Rd0000644000175100001440000000634012251674014013146 0ustar hornikusers\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.Rd0000644000175100001440000001364512251674014013730 0ustar hornikusers\name{multimin} \alias{Multimin} \alias{multimin} \alias{multimin.init} \alias{multimin.iterate} \alias{multimin.restart} \alias{multimin.fminimizer.size} \title{Function minimization} \description{ 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: 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.Rd0000644000175100001440000000413412251674014012651 0ustar hornikusers\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.Rd0000644000175100001440000000232012251674014013664 0ustar hornikusers\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.Rd0000644000175100001440000000464512251674014014310 0ustar hornikusers\name{gsl-package} \alias{gsl-package} \alias{gsl} \alias{GSL} \docType{package} \title{ Wrappers for the Gnu Scientific Library } \description{ An \R wrapper for the special functions and quasi random number generators of the Gnu Scientific Library (\url{http://www.gnu.org/software/gsl/}) } \details{ \tabular{ll}{ Package: \tab gsl\cr Type: \tab Package\cr Version: \tab 1.8-3\cr Date: \tab 2007-05-23\cr License: \tab gsl\cr } 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{ \itemize{ \item Robin K. S. Hankin (special functions) \item Martin Maechler (quasi random sequences, \code{Qrng.Rd}) \item Andrew Clausen (function minimization, \code{Multimin.Rd}) } Maintainer: } \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.Rd0000644000175100001440000000367112251674014013035 0ustar hornikusers\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.Rd0000644000175100001440000000337512251674014013367 0ustar hornikusers\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.Rd0000644000175100001440000000603212251674014013522 0ustar hornikusers\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.Rd0000644000175100001440000000535212251674014013032 0ustar hornikusers\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.Rd0000644000175100001440000000476712251674014013366 0ustar hornikusers\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,n, 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.7,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.Rd0000644000175100001440000000135312251674014013356 0ustar hornikusers\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.Rd0000644000175100001440000000226212251674014013703 0ustar hornikusers\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.Rd0000644000175100001440000000634512251674014013656 0ustar hornikusers\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_Plm} \alias{legendre_Plm_array} \alias{legendre_sphPlm} \alias{legendre_sphPlm_array} \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_Plm(l, m, x, give=FALSE, strict=TRUE) legendre_Plm_array(lmax, m, x, give=FALSE, strict=TRUE) legendre_sphPlm(l, m, x, give=FALSE, strict=TRUE) legendre_sphPlm_array(lmax, 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{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) } \keyword{array} gsl/man/Bessel.Rd0000644000175100001440000001657212251674014013351 0ustar hornikusers\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.Rd0000644000175100001440000000221212251674014012651 0ustar hornikusers\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 \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.Rd0000644000175100001440000000132512251674014013514 0ustar hornikusers\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.Rd0000644000175100001440000000377112251674014013323 0ustar hornikusers\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/cleanup0000755000175100001440000000015612251674014012436 0ustar hornikusers #! /bin/sh for f in ./config.*; do rm -f $f done if [ -e src/Makevars ]; then rm -f src/Makevars fi exit 0