next up previous index
Next: C337 Exponential Integral Up: CERNLIB Previous: C335 Complex Error

C336 Sine and Cosine Integrals

Routine ID: C336
Author(s): K.S. KölbigLibrary: MATHLIB
Submitter: Submitted: 07.12.1970
Language: FortranRevised: 01.12.1994

Function subprograms RSININ, RCOSIN and DSININ, DCOSIN calculate the sine and cosine integrals

Si(x) 0x{sintt}dt

Ci(x) γ+ln|x|+∫0x{cost - 1t}dt (x≠0)

for real arguments x, where γ= 0.57721 ... is Euler's constant.

On CDC and Cray computers, the double-precision versions DSININ and DCOSIN are not available.

Structure:

FUNCTION subprograms
User Entry Names: RSININ, RCOSIN, DSININ, DCOSIN
Obsolete User Entry Names: SININT RSININ, COSINT RCOSIN
Files Referenced: Unit 6
External References: MTLMTR (N002), ABEND (Z035)

Usage:

In any arithmetic expression, RSININ(X) or DSININ(X) has the value Si( X),
RCOSIN(X) or DCOSIN(X) has the value Ci( X),

where RSININ and RCOSIN are of type REAL, DSININ and DCOSIN are of type DOUBLE PRECISION, and X has the same type as the function name.

Method:

Approximation by truncated Chebyshev series.

Accuracy:

RSININ and RCOSIN (except on CDC and Cray computers) have full single-precision accuracy. For most values of the argument X, DSININ, DCOSIN (and RSININ, RCOSIN on CDC and Cray computers) have an accuracy of approximately one significant digit less than the machine precision.

Error handling:

Error C336.1: X = 0 for RCOSIN or DCOSIN. The function value is set equal to zero, and a message is written on Unit 6, unless subroutine MTLSET (N002) has been called.

References:

  1. Y.L. Luke, The special functions and their approximations, v.II, (Academic Press, New York l969) 325--326

C337



next up previous index
Next: C337 Exponential Integral Up: CERNLIB Previous: C335 Complex Error


Janne Saarela
Mon Apr 3 15:06:23 METDST 1995