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

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

Find root of an input. More...

## Functions
AFAPI array | root (const array &lhs, const array &rhs)
| C++ Interface for nth root. More...
AFAPI array | root (const array &lhs, const double rhs)
| C++ Interface for nth root. More...
AFAPI array | root (const double lhs, const array &rhs)
| C++ Interface for nth root. More...
AFAPI af_err | af_root (af_array *out, const af_array lhs, const af_array rhs, const bool batch)
| C Interface for root. More...

## Detailed Description

Find root of an input.

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

## Function Documentation

AFAPI af_err af_root | ( | af_array * | out,
|  | const af_array | lhs,
|  | const af_array | rhs,
|  | const bool | batch
| ) |  |

C Interface for root.

Parameters

  [out] | out | will contain `lhs` th root of `rhs`
  [in] | lhs | is nth root
  [in] | rhs | is value
  [in] | batch | specifies if operations need to be performed in batch mode

Returns
  AF_SUCCESS if the execution completes properly

AFAPI array af::root | ( | const array & | lhs,
|  | const array & | rhs
| ) |  |

C++ Interface for nth root.

Parameters

  [in] | lhs | is nth root
  [in] | rhs | is value

Returns
  `lhs` th root of `rhs`

AFAPI array af::root | ( | const array & | lhs,
|  | const double | rhs
| ) |  |

C++ Interface for nth root.

Parameters

  [in] | lhs | is nth root
  [in] | rhs | is value

Returns
  `lhs` th root of `rhs`

AFAPI array af::root | ( | const double | lhs,
|  | const array & | rhs
| ) |  |

C++ Interface for nth root.

Parameters

  [in] | lhs | is nth root
  [in] | rhs | is value

Returns
  `lhs` th root of `rhs`