Elemental Intrinsic Function (Generic): Produces the cosine of x.
Syntax
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 1 | REAL(16) | REAL(16) |
| CCOS 2 | COMPLEX(4) | COMPLEX(4) |
| CDCOS 3 | COMPLEX(8) | COMPLEX(8) |
| CQCOS 1 | COMPLEX(16) | COMPLEX(16) |
|
1 VMS and U*X
2 The setting of compiler option /real_size can affect CCOS. 3 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.