This function evaluates a function closely related to the cosine integral.
CIN — Function value. (Output)
X — Argument for which the function value is desired. (Input)
Generic: CIN (X)
Specific: The specific interface names are S_CIN and D_CIN.
Single: CIN (X)
Double: The double precision function name is DCIN.
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.
Informational error
Type Code
2 1 The function underflows because X is too small.
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
CIN( 6.283) = 2.438
PHONE: 713.784.3131 FAX:713.781.9260 |