s Chapter Contents
s Chapter Introduction
NAG C Library Manual

# NAG Library Function Documentnag_sin_integral (s13adc)

## 1  Purpose

nag_sin_integral (s13adc) returns the value of the sine integral $\mathrm{Si}\left(x\right)$.

## 2  Specification

 #include #include
 double nag_sin_integral (double x)

## 3  Description

 $Six = ∫ 0 x sin⁡u u du .$
The approximation is based on several Chebyshev expansions.

## 4  References

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

## 5  Arguments

1:     xdoubleInput
On entry: the argument $x$ of the function.

None.

## 7  Accuracy

If $\delta$ and $\epsilon$ are the relative errors in the argument and result, respectively, then in principle $\left|\epsilon \right|\simeq \left|\left(\delta \mathrm{sin}x\right)/\mathrm{Si}\left(x\right)\right|$. The equality may hold if $\delta$ is greater than the machine precision ($\delta$ due to data errors etc.), but if $\delta$ is simply due to round-off in the machine representation, then since the factor relating $\delta$ to $\epsilon$ is always less than one, the accuracy will be limited by machine precision.
For $\left|x\right|\ge {x}_{\mathrm{hi}}$, where ${x}_{\mathrm{hi}}$ is a machine-dependent value, $\mathrm{Si}\left(x\right)=\frac{1}{2}\pi \mathrm{sign}x$ to within machine precision.

None.

## 9  Example

The following program reads values of the argument $x$ from a file, evaluates the function at each value of $x$ and prints the results.