log1p#
- class saiunit.math.log1p(x, unit_to_scale=None, **kwargs)#
Natural logarithm of
1 + x, element-wise.More accurate than
log(1 + x)for smallx.- Parameters:
- Returns:
out – Element-wise
log(1 + x).- Return type:
Array
Examples
>>> import saiunit as u >>> import jax.numpy as jnp >>> u.math.log1p(jnp.array([0.0, 1e-10])) Array([0.e+00, 1.e-10], dtype=float32)