TAN function (ODBC compatible)

Syntax

TAN ( expression )

Description

The scalar function TAN returns the tangent of expression.

Example

select tan(45 * pi()/180) 'Tangent of 45 degrees' from syscalctable;

TANGENT OF 45 DE

----------------

1.000000000000000

1 record selected

Notes

TAN takes an angle (expression) and returns the ratio of two sides of a right triangle. The ratio is the length of the side opposite the angle divided by the length of the side adjacent to the angle.

- Expression specifies an angle in radians.
- Expression must evaluate to an approximate numeric data type.

To convert degrees to radians, multiply degrees by Pi/180. To convert radians to degrees, multiply radians by 180/Pi.