root

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

## § af_root()

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

## § root() [1/3]

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`

## § root() [2/3]

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`

## § root() [3/3]

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`