RADIANS

The RADIANS function returns the number of radians for an argument that is expressed in degrees.

Read syntax diagramSkip visual syntax diagramRADIANS (expression)
expression
An expression that returns a value of any built-in numeric, character-string, or graphic-string data type. A string argument is cast 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.

If the data type of the argument is DECFLOAT(n), the result is DECFLOAT(n). Otherwise, 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 that host variable HDEG is an INTEGER with a value of 180. The following statement:
      SELECT RADIANS(:HDEG)
        FROM SYSIBM.SYSDUMMY1
    Returns a double precision floating-point number with an approximate value of 3.1415926536.