sqrt

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

Square root of input arrays. More...

## Functions
AFAPI array | sqrt (const array &in)
| C++ Interface for square root of input. More...
AFAPI af_err | af_sqrt (af_array *out, const af_array in)
| C Interface for square root. More...

## Detailed Description

Square root of input arrays.

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

## Function Documentation

## § af_sqrt()

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

C Interface for square root.

Parameters

  [out] | out | will contain the square root of `in`
  [in] | in | is input

Returns
  AF_SUCCESS if the execution completes properly

## § sqrt()

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

C++ Interface for square root of input.

Parameters

  [in] | in | is input

Returns
  the square root of input

Examples:
  benchmarks/pi.cpp, financial/black_scholes_options.cpp, financial/heston_model.cpp, financial/monte_carlo_options.cpp, graphics/fractal.cpp, graphics/gravity_sim.cpp, image_processing/brain_segmentation.cpp, image_processing/filters.cpp, machine_learning/deep_belief_net.cpp, machine_learning/naive_bayes.cpp, machine_learning/neural_network.cpp, and machine_learning/rbm.cpp.