gives a list of the quotient and remainder from division of m by n.
- QuotientRemainder is also known as the ratio and quantity "left over" from division of m by n.
- Integer mathematical function, suitable for both symbolic and numerical manipulation.
- QuotientRemainder[n1,n2] returns the ratio of n1,n2 and the quantity "left over".
Examplesopen allclose all
Basic Examples (2)
Compute the quotient and remainder of two numbers:
Plot the sequence of quotients:
Plot the sequence of remainders:
QuotientRemainder works over integers:
Inexact real numbers:
Compute for large integers:
QuotientRemainder threads elementwise over lists:
Basic Appications (3)
Plot the quotient of a number of division by 5:
Plot the remainder of a number of division by 5:
Plot the quotient of two integers:
Number Theory (5)
Use NestWhileList to compute the quotient of positive arguments:
Use Floor to compute the quotient for integers:
Demonstrate how division works:
Count the number of positive integers less than 1000 divisible by 2 or 3, but not divisible by 6:
The Euclidean algorithm:
Properties & Relations (2)