A high-performance general-purpose compute library

- Main Page
- Tutorials
- Release Notes
- Examples

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

## Functions
array | floor (const array &in)
| C++ Interface to floor numbers.
af_err | af_floor (af_array *out, const af_array in)
| C Interface to floor numbers.
af_err | af_hypot (af_array *out, const af_array lhs, const af_array rhs, const bool batch)
| C Interface to calculate the length of the hypotenuse of two inputs.

## Detailed Description

Rounds down to the greatest integer less than or equal to x.

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

## Function Documentation

## ◆ af_floor()

af_err af_floor | ( | af_array * | out,
|  | const af_array | in )

C Interface to floor numbers.

Parameters

  [out] | out | nearest integer less than or equal to `in`
  [in] | in | input array

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

## ◆ af_hypot()

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

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

Parameters

  [out] | out | length of the hypotenuse
  [in] | lhs | length of first side
  [in] | rhs | length of second side
  [in] | batch | batch mode

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

## ◆ floor()

array floor | ( | const array & | in | ) |

C++ Interface to floor numbers.

Parameters

  [in] | in | input array

Returns
  nearest integer less than or equal to `in`