Chapter 3: Exponential Integrals and Related Functions

CIN

This function evaluates a function closely related to the cosine integral.

Function Return Value

CIN — Function value.    (Output)

Required Arguments

X — Argument for which the function value is desired.    (Input)

FORTRAN 90 Interface

Generic:                              CIN (X)

Specific:                             The specific interface names are S_CIN and D_CIN.

FORTRAN 77 Interface

Single:                                CIN (X)

Double:                              The double precision function name is DCIN.

Description

The alternate definition of the cosine integral, Cin(x), is

 

For

where s = AMACH(1) is the smallest representable positive number, the result underflows. For

the answer is less accurate than half precision, while for |x| > 1 /ε, the answer has no precision. Here, ε = AMACH(4) is the machine precision.

Comments

Informational error

Type Code

2         1                  The function underflows because X is too small.

Example

In this example, Cin(2π) is computed and printed.

 

      USE CIN_INT

      USE UMACH_INT

      USE CONST_INT

 

      IMPLICIT   NONE

!                                 Declare variables

!

      INTEGER    NOUT

      REAL       VALUE, X

!                                 Compute

      X     = CONST('pi')

      X     = 2.0* X

      VALUE = CIN(X)

!                                 Print the results

      CALL UMACH (2, NOUT)

      WRITE (NOUT,99999) X, VALUE

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

      END

Output

 

CIN( 6.283) =  2.438



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