EasyManua.ls Logo

Olivetti Programma 101 - Rounding Techniques Continued; Division Quotient Rounding Method 2

Olivetti Programma 101
62 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
METHOD 2:
Assume the divisor is in register B and the dividend is in register A.
A + Double dividend.
B
÷
Divide doubled dividend by the divisor.
A/
Special series to generate 2 in the M register.
D/
÷
Divide doubled quotient by 2.
R + Round off.
A
Print rounded quotient.
This routine requires 7 instructions.
Following is a technique for rounding to some position lower than the setting of the Decimal
Wheel, e.g., round to 2 places when the Decimal Wheel is at 5. At the point where the routine
begins, assume the operation has been completed and the value to be rounded is in the A
register.
D/x Multiply the contents of the A register by 10
2
to shift decimal.
/
Transfer the decimal portion of the contents of A to M;
+ Add decimal portion to contents of A.
/
Transfer the decimal portion of the contents of A to M.
- Subtract decimal portion from the contents of A.
D/
÷
Divide the contents of the A register by 10
2
to shift the decimal.
A
Print rounded answer.
This routine requires 7 instructions and 1 register containing a constant 10
n
where n is equal
to the position to which rounding is desired.
- 46 -

Related product manuals