TAN

The TAN function returns the tangent of the argument, where the argument is an angle expressed in radians. The TAN and ATAN functions are inverse operations.

Read syntax diagramSkip visual syntax diagramTAN (expression)
expression
An expression that returns a value of any built-in numeric data type (except for DECFLOAT), character-string, or graphic-string data type. A string argument is converted to double-precision floating point before evaluating the function. For more information about converting strings to double-precision floating point, see DOUBLE_PRECISION or DOUBLE.

The data type of the result is double-precision floating point. If the argument can be null, the result can be null; if the argument is null, the result is the null value.

Example

  • Assume the host variable TANGENT is a DECIMAL(2,1) host variable with a value of 1.5.
      SELECT TAN(:TANGENT)
        FROM SYSIBM.SYSDUMMY1
    Returns the approximate value 14.10.