Sunday, August 6, 2023

Integer Division with Scientific Calculators

Integer Division with Scientific Calculators



Integer Division


A popular function of European scientific and fraction-featured calculators is the integer division function (also known as Euclidean division).  Integer division between two numbers (typically positive integers) return both the quotient and the remainder.


Example:  

456 int÷ 78 returns a quotient of 5 and a remainder of 66.


Here's a way to execute integer division with various calculators.



TI-36X Pro and TI-30X Pro Math Print


Integer division can be easily accomplished by using two functions:


Quotient:  Either int(x/y) or iPart(x/y)


Remainder:  mod(x,y)


Example:   456 int÷ 78

int(456/78) = 5,  mod(456, 78) = 66



Casio fx-991EX and Casio fx-991CW


Assuming x and y are positive integers, what we do depends on whether y is prime or composite.  We will assume that MathIO mode is activated.  


If y is prime:  We can divide x ÷ y, and change the result into a mixed format.


Example:  6140 int÷ 47

47 is prime.

Key in 6140 ÷ 47.  Change the result into a mixed format.  The result is 130 30/47.


Then the quotient is 130, the remainder is 47.


If y is not prime, we will not be able to do this because the fractions are always simplified to the irreducible form.


Then we will have to use the following steps:

1.   Divide x by y.   Take note of the integer portion (you may have to change the format to mixed fraction or decimal format first).   

2.  For the remainder, execute this formula:   x - quotient * y.  


Example:  5518 int÷ 32

32 is not prime.


1.  Calculate the quotient:  5518 ÷ 32 = 172 1/4.  Note that the integer part, 172 is the quotient.

2.  Calculate the remainder:  5518 - 172 * 32 = 14.  


Then the quotient is 172, the remainder is 14.  



Hewlett Packard HP 41C/Swiss Micros DM41X


Program Code:


01  LBL áµ€ INTD

02  x<>y

03  STO Z

04  x<>y

05  ST/ Z

06  MOD

07  x<>y

08  INT

09  x<>y

10  END



Eddie


All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.