Close
Close window
iquo - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

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,r<n and 0mr.

If either of m or n is symbolic, then irem remains unevaluated.

Thread Safety

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

For more information on thread safety, see index/threadsafe .

Examples

>

irem23&comma;4&comma;q

3

(1)
>

q

5

(2)
>

iquo23&comma;4&comma;r

5

(3)
>

r

3

(4)
>

irem23&comma;4

−3

(5)
>

iquo23&comma;4

−5

(6)
>

irem23&comma;4

3

(7)
>

iquo23&comma;4

−5

(8)
>

irem23&comma;4

−3

(9)
>

iquo23&comma;4

5

(10)

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

>

iremx&comma;3

iremx&comma;3

(11)
>

remx&comma;3&comma;x&comma;q

0

(12)
>

q

x3

(13)

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

>

irem5&comma;2.3

>

frem5&comma;2.3

0.4

(14)

See Also


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /