Python/ref cmath sin

来自菜鸟教程
机器人讨论 | 贡献2020年10月29日 (四) 08:49的版本 (机器人:添加分类Python基础教程
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至:导航、​搜索

<languages />

Python cmath.sin()方法

❮cmath方法

查找复数的正弦值:

    #import cmath for complex number operations 
import cmath

#find 
    the sine of complex number
print (cmath.sin(2 + 3j))

定义和用法

The cmath.sin() 方法返回数字的正弦值。

正弦波是三角函数,代表直角三角形的相对侧和斜边之间的比率。

句法

    cmath.sin(x)
  

参数值

参数 描述
x 需要。找到正弦的数字

技术细节

返回值: A

complex 值,表示复数的正弦

Python版本: 1.5

❮cmath方法