ArrayFire: rem (original) (raw)
Calculate the remainder of a division. More...
| Functions | |
|---|---|
| AFAPI af_err | af_rem (af_array *out, const af_array lhs, const af_array rhs, const bool batch) |
| C Interface to calculate the remainder. More... | |
| AFAPI array | rem (const array &lhs, const array &rhs) |
| AFAPI array | rem (const array &lhs, const double rhs) |
| AFAPI array | rem (const double lhs, const array &rhs) |
Calculate the remainder of a division.
Note
This function only supports real inputs; complex inputs are not yet supported.
◆ af_rem()
C Interface to calculate the remainder.
For integers, it returns the same output as modulus (% operator) For floating point numbers, it returns the same as remainder from <math.h>
Parameters
| [out] | out | remainder |
|---|---|---|
| [in] | lhs | numerator |
| [in] | rhs | denominator |
| [in] | batch | batch mode |
Returns
AF_SUCCESS, if function returns successfully, else an af_err code is given
◆ rem() [1/3]
C++ Interface to calculate the remainder.
For integers, it returns the same output as modulus (% operator) For floating point numbers, it returns the same as std::remainder from
Parameters
| [in] | lhs | numerator; can be an array or a scalar |
|---|---|---|
| [in] | rhs | denominator; can be an array or a scalar |
Returns
remainder
◆ rem() [2/3]
C++ Interface to calculate the remainder.
For integers, it returns the same output as modulus (% operator) For floating point numbers, it returns the same as std::remainder from
Parameters
| [in] | lhs | numerator; can be an array or a scalar |
|---|---|---|
| [in] | rhs | denominator; can be an array or a scalar |
Returns
remainder
◆ rem() [3/3]
C++ Interface to calculate the remainder.
For integers, it returns the same output as modulus (% operator) For floating point numbers, it returns the same as std::remainder from
Parameters
| [in] | lhs | numerator; can be an array or a scalar |
|---|---|---|
| [in] | rhs | denominator; can be an array or a scalar |
Returns
remainder