COS — Cosine function#
-
COS(X)#
COS(X)computes the cosine ofX.- Parameters:
X – The type shall be
REALorCOMPLEX.- Returns:
The return value is of the same type and kind as
X. The real part of the result is in radians. IfXis of the typeREAL, the return value lies in the range -1 leq cos (x) leq 1.
- Standard:
Fortran 77 and later, has overloads that are GNU extensions
- Class:
Elemental function
- Syntax:
RESULT = COS(X)
- Example:
program test_cos real :: x = 0.0 x = cos(x) end program test_cos
- Specific names:
Name
Argument
Return type
Standard
COS(X)REAL(4) XREAL(4)Fortran 77 and later
DCOS(X)REAL(8) XREAL(8)Fortran 77 and later
CCOS(X)COMPLEX(4) XCOMPLEX(4)Fortran 77 and later
ZCOS(X)COMPLEX(8) XCOMPLEX(8)GNU extension
CDCOS(X)COMPLEX(8) XCOMPLEX(8)GNU extension
- See also: