Oracle SQL - Use PI to convert degrees into radians

Introduction

The following code shows an example using the arithmetic functions SIN, TANH, EXP, LOG, and LN.

The number 3.14159265 as an approximation of p (pi) is used in the SIN function to convert degrees into radians.

Demo

SQL>
SQL> select sin(30*3.14159265/180), tanh(0.5)
  2  ,      exp(4), log(2,32), ln(32)-- from   w w w . ja va2 s. c  om
  3  from   dual;

SIN(30*3.14159265/180) | TANH(0.5) |    EXP(4) | LOG(2,32) |    LN(32)
---------------------- | --------- | --------- | --------- | ---------
              00000.50 |  00000.46 |  00054.60 |  00005.00 |  00003.47

SQL>

Related Topic