A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

Functions
log1p
ArrayFire Functions | ArrayFire Functions by Category » Mathematical functions » Exponential and logarithmic functions

## Functions
array | log1p (const array &in)
| C++ Interface to evaluate the natural logarithm of 1 + input, `ln(1+in)`.
af_err | af_log1p (af_array *out, const af_array in)
| C Interface to evaluate the natural logarithm of 1 + input, `ln(1+in)`.

## Detailed Description

Evaluate the natural logarithm of 1 + input, `ln(1+in)`.

Note
  This function only supports real inputs; complex inputs are not yet supported.

## Function Documentation

## ◆ af_log1p()

af_err af_log1p | ( | af_array * | out,
|  | const af_array | in )

C Interface to evaluate the natural logarithm of 1 + input, `ln(1+in)`.

Parameters

  [out] | out | logarithm of `in + 1`
  [in] | in | input array

Returns
  AF_SUCCESS, if function returns successfully, else an af_err code is given

## ◆ log1p()

array log1p | ( | const array & | in | ) |

C++ Interface to evaluate the natural logarithm of 1 + input, `ln(1+in)`.

This function is useful when `in` is small.

Parameters

  [in] | in | input

Returns
  natural logarithm of `1 + input`