s17dg {NAGFWrappers} | R Documentation |
s17dg returns the value of the Airy function Ai(z) or its derivative Ai'(z) for complex z, with an option for exponential scaling.
s17dg(deriv, z, scal)
deriv |
string Specifies whether the function or its derivative is required. If deriv='F', Ai(z) is returned. If deriv='D', Ai'(z) is returned. |
z |
complex The argument z of the function. |
scal |
string The scaling option. scal='U': The result is returned unscaled. scal='S': The result is returned scaled by the factor e^2z sqrt(z) / 3. |
R interface to the NAG Fortran routine S17DGF.
AI |
complex The required function or derivative value. |
NZ |
integer Indicates whether or not ai is set to zero due to underflow. This can only occur when scal='U'. nz = 0: ai is not set to zero. nz = 1: ai is set to zero. |
IFAIL |
integer ifail =0unless the function detects an error or a warning has been flagged (see the Errors section in Fortran library documentation). |
NAG
http://www.nag.co.uk/numeric/FL/nagdoc_fl23/pdf/S/s17dgf.pdf
ifail<-0 deriv<-'F' z<-complex(1,0.3,0.4) scal<-'U' s17dg(deriv,z,scal)