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

s07aa returns the value of the circular tangent, tanx.

Syntax

C#
public static double s07aa(
	double x,
	out int ifail
)
Visual Basic (Declaration)
Public Shared Function s07aa ( _
	x As Double, _
	<OutAttribute> ByRef ifail As Integer _
) As Double
Visual C++
public:
static double s07aa(
	double x, 
	[OutAttribute] int% ifail
)
F#
static member s07aa : 
        x:float * 
        ifail:int byref -> float 

Parameters

x
Type: System..::.Double
On entry: the argument x of the function.
ifail
Type: System..::.Int32 %
On exit: ifail=0 unless the method detects an error (see [Error Indicators and Warnings]).

Return Value

s07aa returns the value of the circular tangent, tanx.

Description

s07aa calculates an approximate value for the circular tangent of its argument, tanx. It is based on the Chebyshev expansion
tanθ=θyt=θ'r=0crTrt
where - π4<θ< π4  and -1<t<+1,  t=2 4θπ 2-1.
The reduction to the standard range is accomplished by taking
x=Nπ/2+θ
where N is an integer and -π4<θ<π4 ,
i.e., θ=x- 2xπ π2  where N = 2x π = ​ the nearest integer to ​ 2x π .
From the properties of tanx it follows that
tanx= tanθ, Neven -1/tanθ, Nodd

References

Error Indicators and Warnings

Accuracy

If δ and ε are the relative errors in the argument and result respectively, then in principle
ε2x sin2x δ.
That is a relative error in the argument, x, is amplified by at least a factor 2x/sin2x in the result.
Similarly if E is the absolute error in the result this is given by
Excos2x δ.
The equalities should hold if δ is greater than the machine precision (δ is a result of data errors etc.) but if δ is simply the round-off error in the machine it is possible that internal calculation rounding will lose an extra figure.

Further Comments

Example

See Also