Python cmath.log10()วิธี การ
ตัวอย่าง
ค้นหาลอการิทึมฐาน 10 ของจำนวนเชิงซ้อน:
#Import cmath Library
import cmath
#print base-10 log value of
complex numbers
print (cmath.log10(2+ 3j))
print (cmath.log10(1+ 2j))
ความหมายและการใช้งาน
วิธี การcmath.log10()
ส่งคืนลอการิทึมฐาน 10 ของจำนวนเชิงซ้อน
มีการตัดกิ่งหนึ่งจาก 0 ตามแกนจริงเชิงลบถึง -∞ ต่อเนื่องจากด้านบน
ไวยากรณ์
cmath.log10(x)
ค่าพารามิเตอร์
Parameter | Description |
---|---|
x | Required. Specifies the value to calculate the base-10 logarithm for. If the value is 0 or a negative number, it returns a ValueError. If the value is not a number, it returns a TypeError |
รายละเอียดทางเทคนิค
คืนมูลค่า: | ค่า ที่complex แทนลอการิทึมฐาน 10 ของตัวเลข |
---|---|
เวอร์ชันหลาม: | 1.5 |