COS(X)
Purpose
Cosine function.
Class
Elemental function
Argument type and attributes
- X
- An INTENT(IN) REAL or COMPLEX
Result type and attributes
Same as X.
Result value
- It has a value that approximates cos(X).
- If X is of type real, X is regarded as a value in radians.
- If X is of type complex, the real and imaginary parts of X are regarded as values in radians.
Examples
COS (1.0) has the value 0.54030231 (approximately).
| Specific Name | Argument Type | Result Type | Pass As Arg? |
|---|---|---|---|
| COS | default real | default real | yes |
| DCOS | double precision real | double precision real | yes |
| QCOS 1 | REAL(16) | REAL(16) | yes |
| CCOS 2a | default complex | default complex | yes |
| CDCOS 1 2b | double complex | double complex | yes |
| ZCOS 1 2b | double complex | double complex | yes |
| CQCOS 1 2b | COMPLEX(16) | COMPLEX(16) | yes |
Note:
- IBM extension.
- Given that X is a complex number in the form a + bi, where i = (-1)½ :
- abs(b) must be less than or equal to 88.7228; a is any real value.
- abs(b) must be less than or equal to 709.7827; a is any real value.


