w3resource

Oracle COS() function

Description

The COS() function is used to get the cosine of a number where the number is given in radians.
The function takes any numeric or nonnumeric data type (can be implicitly converted to a numeric data type) as an argument.
If the argument is BINARY_FLOAT, then the function returns BINARY_DOUBLE. Otherwise, the function returns the same numeric data type as the argument

Uses of Oracle COS() Function
  • Trigonometric Calculations: Compute the cosine of angles provided in radians.

  • Engineering Applications: Perform cosine operations in various engineering fields.

  • Scientific Research: Apply the cosine function in scientific studies and experiments.

  • Mathematical Operations: Utilize in mathematical formulas requiring cosine values.

  • Data Analysis: Conduct cosine transformations in data analysis.

  • Graphical Representations: Generate and plot cosine curves for visual data representation.

Syntax:

COS(N)

Parameters:

Name Description
N A number whose cosine value is to be retrieved.

Pictorial Presentation of COS() function

Pictorial Presentation of Oracle COS() function

Example-1

The statement below will return the cosine of 180 degrees.

SELECT COS(180 * 3.14159265359/180) "Cosine 180 degrees"
  FROM DUAL;

Here is the result.

Cosine 180 degrees
------------------
                -1

Example-2

The statement below will return the cosine of the number 1.

SELECT COS(1) "Cosine"
FROM DUAL;

Here is the result.

    COS(1)
----------
.540302306

Previous: CEIL
Next: COSH



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/oracle/oracle-numeric-functions/oracle-cos-function.php