A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

hypot
ArrayFire Functions | ArrayFire Functions by Category » Mathematical functions » Numeric functions

array | hypot (const array &lhs, const array &rhs)
| C++ Interface to calculate the length of the hypotenuse of two inputs.
array | hypot (const array &lhs, const double rhs)
| C++ Interface to calculate the length of the hypotenuse of two inputs.
array | hypot (const double lhs, const array &rhs)
| C++ Interface to calculate the length of the hypotenuse of two inputs.

## Detailed Description

Evaluate the length of the hypotenuse of two inputs.

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

## Function Documentation

## ◆ hypot() [1/3]

array hypot | ( | const array & | lhs,
|  | const array & | rhs )

C++ Interface to calculate the length of the hypotenuse of two inputs.

Calculates the hypotenuse of two inputs. The inputs can be both arrays or can be an array and a scalar.

Parameters

  [in] | lhs | length of first side
  [in] | rhs | length of second side

Returns
  length of the hypotenuse

## ◆ hypot() [2/3]

array hypot | ( | const array & | lhs,
|  | const double | rhs )

C++ Interface to calculate the length of the hypotenuse of two inputs.

Calculates the hypotenuse of two inputs. The inputs can be both arrays or can be an array and a scalar.

Parameters

  [in] | lhs | length of first side
  [in] | rhs | length of second side

Returns
  length of the hypotenuse

## ◆ hypot() [3/3]

array hypot | ( | const double | lhs,
|  | const array & | rhs )

C++ Interface to calculate the length of the hypotenuse of two inputs.

Calculates the hypotenuse of two inputs. The inputs can be both arrays or can be an array and a scalar.

Parameters

  [in] | lhs | length of first side
  [in] | rhs | length of second side

Returns
  length of the hypotenuse