log1p (Function)
Signature: log1p(x: float) -> float
Description: Computes ln(1 + x) without first rounding 1 + x, preserving small inputs. x = -1 yields negative infinity; x < -1 yields NaN.
Parameters
- x (
float): The value added to 1 before the logarithm
Returns: float
Example
print(log1p(0.1)) // 0.09531017980432487
print (log1p 0.1) // 0.09531017980432487