A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

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

## Functions
array | root (const array &nth_root, const array &value)
| C++ Interface to evaluate the nth root.
array | root (const array &nth_root, const double value)
| C++ Interface to evaluate the nth root.
array | root (const double nth_root, const array &value)
| C++ Interface to evaluate the nth root.
af_err | af_root (af_array *out, const af_array lhs, const af_array rhs, const bool batch)
| C Interface to evaluate the nth root.

## Detailed Description

Evaluate the nth root.

## Function Documentation

## ◆ af_root()

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

C Interface to evaluate the nth root.

Parameters

  [out] | out | `lhs` th root of `rhs`
  [in] | lhs | nth root
  [in] | rhs | value
  [in] | batch | batch mode

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

## ◆ root() [1/3]

array root | ( | const array & | nth_root,
|  | const array & | value )

C++ Interface to evaluate the nth root.

Parameters

  [in] | nth_root | nth root
  [in] | value | value

Returns
  `nth_root` th root of `value`

## ◆ root() [2/3]

array root | ( | const array & | nth_root,
|  | const double | value )

C++ Interface to evaluate the nth root.

Parameters

  [in] | nth_root | nth root
  [in] | value | value

Returns
  `nth_root` th root of `value`

## ◆ root() [3/3]

array root | ( | const double | nth_root,
|  | const array & | value )

C++ Interface to evaluate the nth root.

Parameters

  [in] | nth_root | nth root
  [in] | value | value

Returns
  `nth_root` th root of `value`