nag_sin_integral (s13adc) (PDF version)
s Chapter Contents
s Chapter Introduction
NAG C Library Manual

NAG Library Function Document

nag_sin_integral (s13adc)

+ Contents

    1  Purpose
    7  Accuracy

1  Purpose

nag_sin_integral (s13adc) returns the value of the sine integral Six .

2  Specification

#include <nag.h>
#include <nags.h>
double  nag_sin_integral (double x)

3  Description

nag_sin_integral (s13adc) evaluates
Six = 0 x sinu 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.

6  Error Indicators and Warnings

None.

7  Accuracy

If δ  and ε  are the relative errors in the argument and result, respectively, then in principle ε δ sinx / Six . 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.
For x x hi , where x hi  is a machine-dependent value, Six = 1 2 π signx  to within machine precision.

8  Further Comments

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.

9.1  Program Text

Program Text (s13adce.c)

9.2  Program Data

Program Data (s13adce.d)

9.3  Program Results

Program Results (s13adce.r)


nag_sin_integral (s13adc) (PDF version)
s Chapter Contents
s Chapter Introduction
NAG C Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012