Oracle PL/SQL Tutorial/Numerical Math Functions/TANH

Материал из SQL эксперт
Перейти к: навигация, поиск

select tanh(0.5)

   <source lang="sql">

SQL> SQL> SQL> SQL> select tanh(0.5)

 2  from   dual;
TANH(0.5)

.462117157 SQL> SQL></source>


TANH(1)

   <source lang="sql">

SQL> select TANH(1) from dual;

  TANH(1)

.761594156</source>


Using the TANH function to find the hyperbolic tangent of 30 degrees

   <source lang="sql">

SQL> SQL> SQL> -- create demo table SQL> create table myTable(

 2    value1           NUMBER(3),
 3    value2           NUMBER(3),
 4    value3           NUMBER(3)
 5  )
 6  /

Table created. SQL> SQL> -- prepare data SQL> insert into myTable(value1,value2, value3) values (30,60,90)

 2  /

1 row created. SQL> select * from myTable

 2  /
   VALUE1     VALUE2     VALUE3

---------- ----------
       30         60         90

SQL> SQL> SELECT TANH(value1*2*3.1416/360)FROM myTable

 2  /

TANH(VALUE1*2*3.1416/360)


               .48047372

SQL> SQL> -- clean the table SQL> drop table myTable

 2  /

Table dropped. SQL></source>