طريقة 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 |