Chapter 3: Exponential Integrals and Related Functions

CI

This function evaluates the cosine integral.

Function Return Value

CI Function value.    (Output)

Required Arguments

XArgument for which the function value is desired.    (Input)
It must be greater than zero.

FORTRAN 90 Interface

Generic:                              CI (X)

Specific:                             The specific interface names are S_CI and D_CI.

FORTRAN 77 Interface

Single:                                CI (X)

Double:                              The double precision function name is DCI.

Description

The cosine integral, Ci(x), is defined to be

Where γ ≈ 0.57721566 is Euler's constant.

The argument x must be larger than zero. If

then the result will be less accurate than half precision. If x > 1/ε, the result will have no precision.  Here, ε = AMACH(4) is the machine  precision.

Example

In this example, Ci(1.5) is computed and printed.

 

      USE CI_INT

      USE UMACH_INT

 

      IMPLICIT   NONE

!                                 Declare variables

      INTEGER    NOUT

      REAL       VALUE, X

!                                 Compute

      X     = 1.5

      VALUE = CI(X)

!                                 Print the results

      CALL UMACH (2, NOUT)

      WRITE (NOUT,99999) X, VALUE

99999 FORMAT (' CI(', F6.3, ') = ', F6.3)

      END

Output

 

CI( 1.500) =  0.470



http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260