DB2 Scalar functions - DEGREES


Volta a página anterior

Volta ao Menu das scalar functions

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

DEGREES
DEGREES

The DEGREES function returns the number of degrees of the argument, which is an angle expressed in radians.

DEGREES(expression)

The schema is SYSIBM.
(The SYSFUN version of the DEGREES function continues to be available.)

expression
An expression that returns a value of any built-in numeric data type.
If the value is of decimal floating-point data type, the operation is performed in decimal floating-point; otherwise, the value is converted to double-precision floating-point for processing by the function.

If the argument is DECFLOAT(n), the result is DECFLOAT(n);
otherwise, the result is a double-precision floating-point number.
The result can be null; if the argument is null, the result is the null value.

Example

Assume that RAD is a DECIMAL(4,3) host variable with a value of 3.142.

   VALUES DEGREES(:RAD)
Returns the approximate value 180.0.
© Copyright IBM Corp.