tangent function

The tan function is a trigonometric function. The tan function returns the tangent of an angle specified in radians.

Syntax:

double tan(n)

Semantics:

  • n: The argument n is an expression that resolves to a number (an angle expressed in radians).
  • return type: double.

    The resultant value is in the range -1 through 1 with the following exceptions:

    • Returns a NULL value in the following cases:
      • n resolves to a NULL value
      • n does not resolve to a number
    • Returns NaN if n resolves to NaN or infinity(positive/negative).
Example:
SELECT tan(n) FROM Archery
Value of n Output
0 0.0
radians(90) 1.633123935319537E16
pi()/4 0.9999999999999999