SQLite tan() Function
The SQLite tan()
function returns the tangent of the specified radian.
Syntax
Here is the syntax of the SQLite tan()
function:
tan(number)
Parameters
number
-
Required. A number used to calculate the tangent, in radians.
Return value
The SQLite tan()
function returns the tangent of the specified radian.
If the parameter number
is NULL
, the tan()
function will return NULL
.
Examples
This example shows the basic usage of the SQLite tan()
function:
SELECT
tan(2.5),
tan(0.2),
tan(-0.5),
tan(-0.2),
tan(0),
tan(pi());
tan(2.5) = -0.74702229723866
tan(0.2) = 0.202710035508673
tan(-0.5) = -0.54630248984379
tan(-0.2) = -0.202710035508673
tan(0) = 0.0
tan(pi()) = -1.22464679914735e-16
Here, we use the pi()
function to obtain an approximation of π.