This section describes the results derived from applying the basic arithmetic operations to combinations of exceptional and ordinary floating-point values. The information that follows assumes that no traps or any other exception actions are taken.
The following tables explain the abbreviations:
Table A-16 Abbreviation Usage
Abbreviation |
Meaning |
---|---|
Num |
Subnormal or normal number |
Inf |
Infinity (positive or negative) |
NaN |
Not a number |
Uno |
Unordered |
The tables that follow describe the types of values that result from arithmetic operations performed with combinations of different types of operands.
Table A-17 Addition and Subtraction Results
Right Operand |
||||
Left Operand |
0 |
Num |
Inf |
NaN |
0 |
0 |
Num |
Inf |
NaN |
Num |
Num |
See Note |
Inf |
NaN |
Inf |
Inf |
Inf |
See Note |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
Num + Num could be Inf, rather than Num, when the result is too large (overflow). Inf + Inf = NaN when the infinities are of opposite sign.
|
Right Operand |
|||
Left Operand |
0 |
Num |
Inf |
NaN |
0 |
0 |
0 |
NaN |
NaN |
Num |
0 |
Num |
Inf |
NaN |
Inf |
NaN |
Inf |
Inf |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
Table A-19 Division Results
|
Right Operand |
|||
Left Operand |
0 |
Num |
Inf |
NaN |
0 |
NaN |
0 |
0 |
NaN |
Num |
Inf |
Num |
0 |
NaN |
Inf |
Inf |
Inf |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
NaN |
Table A-20 Comparison Results
|
Right Operand |
|||
Left Operand |
0 |
+Num |
+Inf |
NaN |
0 |
= |
< |
< |
Uno |
+Num |
> |
The result of the comparison |
< |
Uno |
+Inf |
> |
> |
= |
Uno |
NaN |
Uno |
Uno |
Uno |
Uno |
NaN compared with NaN is unordered, and results in inequality. +0 compares equal to -0.