Collection
zero Useful+1
zero

Antithesis

The operation of aligning the order of two floating point numbers for operation
Exponent matching refers to the operation of aligning the order codes of two floating point numbers. The purpose of order matching is to add or subtract the mantissa of two floating point numbers.
Chinese name
Antithesis
Foreign name
exponent matching
Definition
It refers to the operation of aligning the order of two floating point numbers for operation

Cause

Announce
edit
To add or subtract two floating point numbers, first check whether the order codes of the two numbers are the same, that is, whether the decimal points are aligned. If the order codes of two numbers are the same, it means that the decimal points are aligned, then the mantissa can be added or subtracted. On the contrary, the order codes of two numbers need to be the same. This process is called order matching.
The so-called order matching refers to the operation of two Floating point number The operation of order alignment of. The purpose of order matching is to add or subtract the mantissa of two floating point numbers. Because when adding and subtracting Mx · 2Ex and My · 2Ey, the same index value can be raised as a common factor only when the index value of two floating point numbers is partially the same, and then the addition and subtraction of mantissa can be performed.

Specific method of order matching

Announce
edit
First, find two floating point numbers Order code The difference of △ E=Ex Ey. Add △ E to the small order code to make it equal to the large order code. At the same time, move the mantissa of the floating point number corresponding to the small order code to the right to ensure that the value of the floating point number remains unchanged.

matters needing attention

Announce
edit
(1) The principle of order matching is small order to large order. This is because if the large order is small order, the high order of the numerical part of the mantissa needs to be moved out, while the small order is large order, and the low order of the numerical part of the mantissa needs to be moved out, so the loss of precision is smaller. (2) If  E=0, it means that the order codes of the two floating point numbers are the same, and there is no need to perform order matching. (3) When the mantissa represented by complement is shifted to the right, the sign bit remains unchanged. (4) Since the mantissa moves to the right is to move the lowest bit out, which will lose some precision, in order to reduce the error, a number of shifted bits can be reserved for later rounding processing.