irem - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Group Theory : Numbers : Integer Functions : irem

irem

integer remainder

iquo

integer quotient

 

Calling Sequence

Parameters

Description

Thread Safety

Examples

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&equals;nq&plus;r&comma;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;&apos;q&apos;

3

(1)

q

5

(2)

iquo23&comma;4&comma;&apos;r&apos;

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;&apos;q&apos;

0

(12)

q

13x

(13)

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

irem5&comma;2.3

Error, invalid input: irem received 2.3, which is not valid for its 2nd argument, n

frem5&comma;2.3

0.4

(14)

See Also

frem

quo

rem

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam