Python cmath.cos()วิธี การ
ตัวอย่าง
หาโคไซน์ของจำนวนเชิงซ้อน:
#import cmath for complex number operations
import cmath
#find
the cosine of a complex number
print (cmath.cos(2 + 3j))
ความหมายและการใช้งาน
วิธี นี้cmath.cos()
จะคืนค่าโคไซน์ของจำนวนเชิงซ้อน
ไวยากรณ์
cmath.cos(x)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
x | Required. A number to find the cosine of |
รายละเอียดทางเทคนิค
คืนมูลค่า: | ค่าcomplex ซึ่งแทนโคไซน์ของจำนวนเชิงซ้อน |
---|---|
เวอร์ชันหลาม: | 1.5 |