log1p#

rbc.stdlib.elementwise_functions.log1p(x)#

Calculates an implementation-dependent approximation to log(1+x), where log refers to the natural (base e) logarithm, having domain [-1, +infinity] and codomain [-infinity, +infinity], for each element x_i of the input array x.

Examples

>>> from rbc.stdlib import array_api
>>> @heavydb('double[](double[])')
... def array_api_log1p(x):
...     return array_api.log1p(x)
>>> array_api_log1p([np.e, 8.0]).execute()
array([1.3132616, 2.1972246], dtype=float32)

Array-API ‘log1p’ doc