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
Description
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
Published date: 03/19/2020
Last modified date: 03/19/2020