MariaDB: COS Function
This MariaDB tutorial explains how to use the MariaDB COS function with syntax and examples.
Description
The MariaDB COS function returns the cosine of a number.
Syntax
The syntax for the COS function in MariaDB is:
COS( number )
Parameters or Arguments
- number
- The value used to calculate the cosine. It is expressed in radians.
Applies To
The COS function can be used in the following versions of MariaDB:
- MariaDB 10
Example
Let's look at some MariaDB COS function examples and explore how to use the COS function in MariaDB.
For example:
SELECT COS(1); Result: 0.5403023058681398 SELECT COS(PI()); Result: -1 SELECT COS(-0.4); Result: 0.9210609940028851
Advertisements