asin()
是一个系统函数,用于返回一个数字的反正弦(逆正弦),结果以弧度为单位。
asin()
函数于 PostgreSQL 7.0 版本中添加。
用法
asin (double precision
) →double precision
输入值必须在 1
和 -1
之间。
变更历史
- PostgreSQL 7.0
- 添加于 (提交 a349733b)
示例
asin()
的基本用法示例
postgres=# SELECT asin(0.5); asin -------------------- 0.5235987755982989 (1 row)
提供无效的输入值
postgres=# SELECT asin(2); ERROR: input is out of range
参考资料
- PostgreSQL documentation: Trigonometric Functions(三角函数)