Computes the cosine of an input value for an angle measured in radians. The value can be a Decimal or Integer literal or a reference to a column containing numeric values. |
In the above, the cosine of angle A is computed as the following:
cos(A) = y/z |
The secant of angle A is 1/cos(A), or:
sec(A) = 1/cos(A) = z/y |
You can convert from degrees to radians. For more information, see RADIANS Function.
Numeric literal example:
round(cos(radians(30)),3) |
Output: Returns the computation of the cosine of a 30-degree angle, which is converted to radians before being passed to the COS function. The output value is rounded to three decimals: 0.866
.
Column reference example:
cos(X) |
Output: Returns the cosine of the radians values in X
column.
cos(numeric_value) |
Argument | Required? | Data Type | Description |
---|---|---|---|
numeric_value | Y | string, decimal, or integer | Name of column, Decimal or Integer literal, or function returning those types to apply to the function |
Name of the column, Integer or Decimal literal, or function returning that data type to apply to the function.
Required? | Data Type | Example Value |
---|---|---|
Yes | String (column reference) or Integer or Decimal literal | 0.5 |