Metoda cmath.log10() Pythona
Przykład
Znajdź logarytm dziesiętny liczby zespolonej:
#Import cmath Library
import cmath
#print base-10 log value of
complex numbers
print (cmath.log10(2+ 3j))
print (cmath.log10(1+ 2j))
Definicja i użycie
Metoda cmath.log10()
zwraca logarytm dziesiętny liczby zespolonej.
Jest jedna gałąź przecięta od 0 wzdłuż ujemnej osi rzeczywistej do -∞, ciągła od góry.
Składnia
cmath.log10(x)
Wartości parametrów
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 |
Szczegóły techniczne
Wartość zwrotu: | Wartość complex reprezentująca logarytm dziesiętny liczby |
---|---|
Wersja Pythona: | 1,5 |