s17dg Method
関数リスト一覧   NagLibrary Namespaceへ  ライブラリイントロダクション  本ヘルプドキュメントのchm形式版

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

Syntax

C#
public static void s17dg(
	string deriv,
	Complex z,
	string scal,
	out Complex ai,
	out int nz,
	out int ifail
)
Visual Basic (Declaration)
Public Shared Sub s17dg ( _
	deriv As String, _
	z As Complex, _
	scal As String, _
	<OutAttribute> ByRef ai As Complex, _
	<OutAttribute> ByRef nz As Integer, _
	<OutAttribute> ByRef ifail As Integer _
)
Visual C++
public:
static void s17dg(
	String^ deriv, 
	Complex z, 
	String^ scal, 
	[OutAttribute] Complex% ai, 
	[OutAttribute] int% nz, 
	[OutAttribute] int% ifail
)
F#
static member s17dg : 
        deriv:string * 
        z:Complex * 
        scal:string * 
        ai:Complex byref * 
        nz:int byref * 
        ifail:int byref -> unit 

Parameters

deriv
Type: System..::.String
On entry: specifies whether the function or its derivative is required.
If deriv="F", Aiz is returned.
If deriv="D", Aiz is returned.
Constraint: deriv="F" or "D".
z
Type: NagLibrary..::.Complex
On entry: the argument z of the function.
scal
Type: System..::.String
On entry: the scaling option.
scal="U"
The result is returned unscaled.
scal="S"
The result is returned scaled by the factor e2zz/3.
Constraint: scal="U" or "S".
ai
Type: NagLibrary..::.Complex %
On exit: the required function or derivative value.
nz
Type: System..::.Int32 %
On exit: indicates whether or not ai is set to zero due to underflow. This can only occur when scal="U".
If nz=0, ai is not set to zero.
If nz=1, ai is set to zero.
ifail
Type: System..::.Int32 %
On exit: ifail=0 unless the method detects an error (see [Error Indicators and Warnings]).

Description

s17dg returns a value for the Airy function Aiz or its derivative Aiz, where z is complex, -π<argzπ. Optionally, the value is scaled by the factor e2zz/3.
The method is derived from the method CAIRY in Amos (1986). It is based on the relations Aiz= zK1/3w π3 , and Aiz= -zK2/3w π3 , where Kν is the modified Bessel function and w=2zz/3.
For very large z, argument reduction will cause total loss of accuracy, and so no computation is performed. For slightly smaller z, the computation is performed but results are accurate to less than half of machine precision. If Rew is too large, and the unscaled function is required, there is a risk of overflow and so no computation is performed. In all the above cases, a warning is given by the method.

References

Error Indicators and Warnings

Accuracy

All constants in s17dg are given to approximately 18 digits of precision. Calling the number of digits of precision in the floating-point arithmetic being used t, then clearly the maximum number of correct digits in the results obtained is limited by p=mint,18. Because of errors in argument reduction when computing elementary functions inside s17dg, the actual number of correct digits is limited, in general, by p-s, where smax1,log10z represents the number of digits lost due to the argument reduction. Thus the larger the value of z, the less the precision in the result.
Empirical tests with modest values of z, checking relations between Airy functions Aiz, Aiz, Biz and Biz, have shown errors limited to the least significant 3 – 4 digits of precision.

Further Comments

Example

This example prints a caption and then proceeds to read sets of data from the input data stream. The first datum is a value for the parameter deriv, the second is a complex value for the argument, z, and the third is a character value to set the parameter scal. The program calls the method and prints the results. The process is repeated until the end of the input data stream is encountered.

Example program (C#): s17dge.cs

Example program data: s17dge.d

Example program results: s17dge.r

See Also