Home >>Python math Module >Python math.log1p() Method
Python math.log1p() method is used to returns log(1+number) value computed in a way that is accurate even when the value of the number is close to the zero.
Syntax:math.log1p(x)
Parameter | Description |
---|---|
x | This is a required parameter. It defines the number to process. |
import math
print(math.log1p(10))
print(math.log1p(2))
print(math.log1p(1))