s17dg {NAGFWrappers}R Documentation

s17dg: Airy functions Ai(z) and Ai'(z), complex z

Description

s17dg returns the value of the Airy function Ai(z) or its derivative Ai'(z) for complex z, with an option for exponential scaling.

Usage

s17dg(deriv, z, scal)

Arguments

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.

Details

R interface to the NAG Fortran routine S17DGF.

Value

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 =0

unless the function detects an error or a warning has been flagged (see the Errors section in Fortran library documentation).

Author(s)

NAG

References

http://www.nag.co.uk/numeric/FL/nagdoc_fl23/pdf/S/s17dgf.pdf

Examples


ifail<-0

deriv<-'F'

z<-complex(1,0.3,0.4)

scal<-'U'

s17dg(deriv,z,scal)


[Package NAGFWrappers version 24.0 Index]