rem

- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

Functions
rem
Complete List of ArrayFire Functions ArrayFire Functions by Category » Mathematical functions » | Numeric functions

Remainder operation. More...

## Functions
AFAPI af_err | af_rem (af_array *out, const af_array lhs, const af_array rhs, const bool batch)
| C Interface for remainder. More...
AFAPI array | rem (const array &lhs, const array &rhs)
| C++ Interface for remainder when array divides array, scalar divides array or array divides scalar. More...
AFAPI array | rem (const array &lhs, const double rhs)
| C++ Interface for remainder when array divides array, scalar divides array or array divides scalar. More...
AFAPI array | rem (const double lhs, const array &rhs)
| C++ Interface for remainder when array divides array, scalar divides array or array divides scalar. More...

## Detailed Description

Remainder operation.

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

## Function Documentation

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

C Interface for remainder.

Parameters

  [out] | out | will contain the remainder of `lhs` divided by `rhs`
  [in] | lhs | is numerator
  [in] | rhs | is denominator
  [in] | batch | specifies if operations need to be performed in batch mode

Returns
  AF_SUCCESS if the execution completes properly

AFAPI array af::rem | ( | const array & | lhs,
|  | const array & | rhs
| ) |  |

C++ Interface for remainder when array divides array, scalar divides array or array divides scalar.

Parameters

  [in] | lhs | is numerator
  [in] | rhs | is denominator

Returns
  remainder when `rhs` divides `lhs`

AFAPI array af::rem | ( | const array & | lhs,
|  | const double | rhs
| ) |  |

C++ Interface for remainder when array divides array, scalar divides array or array divides scalar.

Parameters

  [in] | lhs | is numerator
  [in] | rhs | is denominator

Returns
  remainder when `rhs` divides `lhs`

AFAPI array af::rem | ( | const double | lhs,
|  | const array & | rhs
| ) |  |

C++ Interface for remainder when array divides array, scalar divides array or array divides scalar.

Parameters

  [in] | lhs | is numerator
  [in] | rhs | is denominator

Returns
  remainder when `rhs` divides `lhs`