FORTRAN Reference Manual

Intrinsic Functions
FORTRAN Reference Manual528615-001
8-12
COS Function
COS Function
The COS function returns the cosine of an angle expressed in radians.
The table below shows the argument and function type for the COS generic function
and its associated specific functions.
Considerations
The result type of the COS function is the same as the type of its argument.
For a real or double precision argument, the function value is always in the range
-1.0 COS ( x) 1.0
For a complex argument z = CMPLX (x, y), the value of COS (z) is defined as
CMPLX (COS (x) * COSH ( y), -SIN (x) * SINH (y))
Example of the COS Function
x = COS (.0572)
COSH Function
The COSH function returns a hyperbolic cosine.
The table below shows the argument and function type for the COSH generic function
and its associated specific function.
Syntax Argument Type Function Type
COS (x)
COS (x) Real Real
DCOS (x) Double Precision Double Precision
CCOS (x) Complex Complex
x is an arithmetic expression.
Syntax Argument Type Function Type
COSH (x)
COSH (x) Real Real
DCOSH (x) Double Precision Double Precision
x is an arithmetic expression.