iquo - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

irem

integer remainder

iquo

integer quotient

 Calling Sequence irem(m, n)  irem(m, n, 'q') iquo(m, n)  iquo(m, n, 'r')

Parameters

 m, n - any expressions q, r - names

Description

 • 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,\left|r\right|<\left|n\right|$ and $0\le mr$.
 • If either of m or n is symbolic, then irem remains unevaluated.

 • The irem and iquo commands are thread-safe as of Maple 15.

Examples

 > $\mathrm{irem}\left(23,4,'q'\right)$
 ${3}$ (1)
 > $q$
 ${5}$ (2)
 > $\mathrm{iquo}\left(23,4,'r'\right)$
 ${5}$ (3)
 > $r$
 ${3}$ (4)
 > $\mathrm{irem}\left(-23,4\right)$
 ${-3}$ (5)
 > $\mathrm{iquo}\left(-23,4\right)$
 ${-5}$ (6)
 > $\mathrm{irem}\left(23,-4\right)$
 ${3}$ (7)
 > $\mathrm{iquo}\left(23,-4\right)$
 ${-5}$ (8)
 > $\mathrm{irem}\left(-23,-4\right)$
 ${-3}$ (9)
 > $\mathrm{iquo}\left(-23,-4\right)$
 ${5}$ (10)

Use the rem and quo commands for symbolic m or n.

 > $\mathrm{irem}\left(x,3\right)$
 ${\mathrm{irem}}{}\left({x}{,}{3}\right)$ (11)
 > $\mathrm{rem}\left(x,3,x,'q'\right)$
 ${0}$ (12)
 > $q$
 $\frac{{x}}{{3}}$ (13)

Use the frem command for floating-point m or n.

 > $\mathrm{irem}\left(5,2.3\right)$
 > $\mathrm{frem}\left(5,2.3\right)$
 ${0.4}$ (14)