Python math.log1p() Yöntemi
Örnek
Farklı numaralar için günlüğü (1+sayı) bulun
# Import math Library
import math
# Return the log(1+number) for different numbers
print(math.log1p(2.7183))
print(math.log1p(2))
print(math.log1p(1))
Tanım ve Kullanım
Yöntem math.log1p()
, sayının değeri sıfıra yakın olduğunda bile doğru bir şekilde hesaplanan log(1+sayı) değerini döndürür.
Sözdizimi
math.log1p(x)
Parametre Değerleri
Parameter | Description |
---|---|
x | Required. Specifies the number to process. If the value is a negative number, it returns a ValueError. If the value is not a number, it returns a TypeError |
Teknik detaylar
Geri dönüş değeri: | 1+ sayınınfloat günlük değerini temsil eden bir değer |
---|---|
Python Sürümü: | 2.6 |