Python asin() 函数

栏目: 编程语言 · Python · 编程教程 · python 教程 · 发布时间: 8年前

内容简介:asin() 返回x的反正弦弧度值。

描述

asin() 返回x的反正弦弧度值。

语法

以下是 asin() 方法的语法:

import math

math.asin(x)

注意:asin()是不能直接访问的,需要导入 math 模块,然后通过 math 静态对象调用该方法。

参数

  • x -- -1到1之间的数值。如果x是大于1,会产生一个错误。

返回值

返回x的反正弦弧度值。

实例

以下展示了使用 asin() 方法的实例:

#!/usr/bin/python
import math

print "asin(0.64) : ",  math.asin(0.64)
print "asin(0) : ",  math.asin(0)
print "asin(-1) : ",  math.asin(-1)
print "asin(1) : ",  math.asin(1)

以上实例运行后输出结果为:

asin(0.64) :  0.694498265627
asin(0) :  0.0
asin(-1) :  -1.57079632679
asin(1) :  1.57079632679

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Producing Masculinity

Producing Masculinity

Michele White / Routledge / 2019-3 / $39.95

Thoughtful, witty, and illuminating, in this book Michele White explores the ways normative masculinity is associated with computers and the Internet and is a commonly enacted online gender practice. ......一起来看看 《Producing Masculinity》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换