log

- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

Functions
log
Complete List of ArrayFire Functions ArrayFire Functions by Category » Mathematical functions » | Exponential and logarithmic functions

Natural logarithm. More...

## Functions
AFAPI array | log (const array &in)
| C++ Interface for natural logarithm. More...
AFAPI af_err | af_log (af_array *out, const af_array in)
| C Interface for natural logarithm. More...

## Detailed Description

Natural logarithm.

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

## Function Documentation

AFAPI af_err af_log | ( | af_array * | out,
|  | const af_array | in
| ) |  |

C Interface for natural logarithm.

Parameters

  [out] | out | will contain the natural logarithm of `in`
  [in] | in | is input

Returns
  AF_SUCCESS if the execution completes properly

AFAPI array af::log | ( | const array & | in | ) |

C++ Interface for natural logarithm.

Parameters

  [in] | in | is input

Returns
  the natural logarithm of input

Examples:
  financial/black_scholes_options.cpp, financial/heston_model.cpp, machine_learning/logistic_regression.cpp, machine_learning/naive_bayes.cpp, and machine_learning/softmax_regression.cpp.