Description: | Produces the cosine of X. | ||
Class: | Elemental function; Generic | ||
Arguments: | X must be of type real or complex. It must be in radians and is treated as modulo 2*pi. (If X is of type complex, its real part is regarded as a value in radians.) | ||
Results: | The result type is the same as X. |
Specific Name | Argument Type | Result Type |
---|---|---|
COS | REAL(4) | REAL(4) |
DCOS | REAL(8) | REAL(8) |
QCOS | REAL(16) | REAL(16) |
CCOS 1 | COMPLEX(4) | COMPLEX(4) |
CDCOS 2 | COMPLEX(8) | COMPLEX(8) |
CQCOS | COMPLEX(16) | COMPLEX(16) |
1 The setting of compiler options specifying
real size can affect CCOS.
2 This function can also be specified as ZCOS. |
Examples
COS (2.0) has the value -0.4161468.
COS (0.567745) has the value 0.8431157.