s13ad returns the value of the sine integral
Six=0xsinuudu,
.

Syntax

C#
public static double s13ad(
	double x
)
Visual Basic
Public Shared Function s13ad ( _
	x As Double _
) As Double
Visual C++
public:
static double s13ad(
	double x
)
F#
static member s13ad : 
        x : float -> float 

Parameters

x
Type: System..::..Double
On entry: the argument x of the function.

Return Value

s13ad returns the value of the sine integral
Six=0xsinuudu,
.

Description

s13ad calculates an approximate value for Six.
For x16.0 it is based on the Chebyshev expansion
Six=xr=0arTrt,t=2x162-1.
For 16<x<xhi, where xhi is an implementation-dependent number,
Six=signxπ2-fxcosxx-gxsinxx2
where fx=r=0frTrt and gx=r=0grTrt, t=216x2-1.
For xxhi, Six=12πsignx to within machine precision.

References

Abramowitz M and Stegun I A (1972) Handbook of Mathematical Functions (3rd Edition) Dover Publications

Error Indicators and Warnings

There are no failure exits from s13ad. The parameter _ifail has been included for consistency with other methods in this chapter.

Accuracy

If δ and ε are the relative errors in the argument and result, respectively, then in principle
εδsinxSix.
The equality may hold if δ is greater than the machine precision (δ due to data errors etc.) but if δ is simply due to round-off in the machine representation, then since the factor relating δ to ε is always less than one, the accuracy will be limited by machine precision.

Parallelism and Performance

None.

Further Comments

None.

Example

This example reads values of the argument x from a file, evaluates the function at each value of x and prints the results.

Example program (C#): s13ade.cs

Example program data: s13ade.d

Example program results: s13ade.r

See Also