### Appendix 4

This appendix is in two parts:
1. A list of all functions which can cause overflow.*
2. A note on the accuracy of the division process.

A. Functions that can cause overflow *

 Title Function Circumstances causing overflow Negate 01, 11, 21, 31 In the case where the number to be negated is -1. Count 02, 12, 22, 32 When C(N) is 1 - 2-38 Add 04, 14, 24, 34 Whenever the sum is outside the range -1 to 1 - 2-38 inclusive. Subtract 05, 15, 25, 35 \Whenever the difference is outside the range -1 to 1 - 2-38 inclusive Negate and Add 07, 17, 27, 37 / Multiply 52, 53 In the case of -1 x -1 only. Double 54, 55 Whenever the correct result lies out the range -1 to 1 - 2-38 inclusive. Divide 56 Whenever the modulus of the numerator (dividend) is greater than that of the denominator (divisor) and in the three cases shown in B(c) below.
* This does not include "Floating-Point Overflow": See Appendix 5

B. The Division Process. This note concerns the accuracy of the result produced by the computer when the true quotient lies within the range -1 to +1 inclusive, in function 56.

1. Since the result is not rounded, when the true quotient is not exactly expressible as a 39-digit computer number, the result may be 2-38 less than that which would be obtained by using a process containing a round-off stage.
2. If a and b are both positive and b > a, and if the quotient is exactly expressible as a 39-digit computer word,
 then for a/b, -a/b, 0/b : the computer results are correct, but for a/-b, -a/-b, 0/-b : the computer results are 2-38 less than the arithmetically correct results.
3. For the division ±a/±a, a > 0, the effects of (b), combined with the fact that there is no representation of +1, cause the results below to be produced. Note also the result obtained for 0/0, and that the overflow indicator is set for this case, and for both cases in which the result of ±a/±a errs by more than 2-38.
 Division Computer result Overflow Indicator a/a -1 Set -a/a -1 Not Set a/-a 1-2-38 Set -a/-a 1-2-38 Not Set 0/0 -2-38 Set

 Previous Appendix Contents Next Appendix