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=n⁢q+r,r<n and 0≤m⁢r.
If either of m or n is symbolic, then irem remains unevaluated.
The irem and iquo commands are thread-safe as of Maple 15.
For more information on thread safety, see index/threadsafe.
irem⁡23,4,q
3
q
5
iquo⁡23,4,r
r
irem⁡−23,4
−3
iquo⁡−23,4
−5
irem⁡23,−4
iquo⁡23,−4
irem⁡−23,−4
iquo⁡−23,−4
Use the rem and quo commands for symbolic m or n.
irem⁡x,3
rem⁡x,3,x,q
0
x3
Use the frem command for floating-point m or n.
irem⁡5,2.3
Error, invalid input: irem received 2.3, which is not valid for its 2nd argument, n
frem⁡5,2.3
0.4
See Also
frem
quo
rem
Download Help Document