irem
integer remainder
iquo
integer quotient
Calling Sequence
Parameters
Description
Thread Safety
Examples
irem(m, n) irem(m, n, 'q')
iquo(m, n) iquo(m, n, 'r')
m, n

any expressions
q, r
names
If m and n are both integers the function irem computes the integer remainder of m divided by n. If the third argument is present it will be assigned the quotient. Likewise, iquo computes the integer quotient of m divided by n and if the third argument is present assigns it the remainder.
Specifically, if m and n are integers then irem returns r such that $m=nq+r,\leftr\right<\leftn\right$ and $0\le mr$.
If either of m or n is symbolic, then irem remains unevaluated.
The irem and iquo commands are threadsafe as of Maple 15.
For more information on thread safety, see index/threadsafe.
$\mathrm{irem}\left(23\,4\,'q'\right)$
${3}$
$q$
${5}$
$\mathrm{iquo}\left(23\,4\,'r'\right)$
$r$
$\mathrm{irem}\left(23\,4\right)$
${\mathrm{3}}$
$\mathrm{iquo}\left(23\,4\right)$
${\mathrm{5}}$
$\mathrm{irem}\left(23\,4\right)$
$\mathrm{iquo}\left(23\,4\right)$
$\mathrm{irem}\left(23\,4\right)$
$\mathrm{iquo}\left(23\,4\right)$
Use the rem and quo commands for symbolic m or n.
$\mathrm{irem}\left(x\,3\right)$
${\mathrm{irem}}{}\left({x}{\,}{3}\right)$
$\mathrm{rem}\left(x\,3\,x\,'q'\right)$
${0}$
$\frac{{x}}{{3}}$
Use the frem command for floatingpoint m or n.
$\mathrm{irem}\left(5\,2.3\right)$
Error, invalid input: irem received 2.3, which is not valid for its 2nd argument, n
$\mathrm{frem}\left(5\,2.3\right)$
${0.4}$
See Also
frem
quo
rem
Download Help Document
What kind of issue would you like to report? (Optional)