Oracle PL/SQL ASIN function example

摘要: The ASIN() function returns arc sine of input n, the input n must be in the range of -1 to 1. The function will return a value in the range of -pi/2 to pi/2, expressed in radians.

The ASIN() function returns arc sine of input n, the input n must be in the range of -1 to 1. The function will return a value in the range of -pi/2 to pi/2, expressed in radians.

ASIN function examples

SELECT ASIN(.25) FROM DUAL; 
-- output 
0.25268025514207865348565743699370756609
SELECT ASIN(-.5) FROM DUAL; 
-- output
-0.52359877559829887307710723054658381405
SELECT ASIN(-1) FROM DUAL; 
--output
-1.5707963267948966192313216916397514421
SELECT ASIN(1) FROM DUAL;   
--output
1.5707963267948966192313216916397514421

Now in below example, we tried to pass value -2.5 which is not in range -1 to 1, and notice the error.

SELECT ASIN(-2.5) FROM DUAL;
-- output
ORA-01428: argument '-2.5' is out of range
01428. 00000 -  "argument '%s' is out of range"

References

  1. ASIN Function :- Oracle official docs

上一篇: Java How to print a Pyramid
下一篇: Oracle PL/SQL ABS function example
 评论 ( What Do You Think )
名称
邮箱
网址
评论
验证
   
 

 


  • 微信公众号

  • 我的微信

站点声明:

1、一号门博客CMS,由Python, MySQL, Nginx, Wsgi 强力驱动

2、部分文章或者资源来源于互联网, 有时候很难判断是否侵权, 若有侵权, 请联系邮箱:summer@yihaomen.com, 同时欢迎大家注册用户,主动发布无版权争议的 文章/资源.

3、鄂ICP备14001754号-3, 鄂公网安备 42280202422812号