Reputation: 24665
In the addition of two floating point numbers, it is stated that the smaller exponent is adjusted to be the same as the bigger exponent. Is that possible to rewrite the bigger exponent the same as smaller one? Then we have to shift right the fraction part of the bigger value.
In theory, I think it is possible. But what is the downside?
Upvotes: 0
Views: 117
Reputation: 2606
"it is stated" where? The adjustments are made so as to retain as much precision as possible. In adjusting the smaller exponent up, its mantissa adjusts down, losing precision at the bottom. If the bigger exponent were made smaller, its mantissa would overflow and you'd get a completely wrong answer.
So no, it's not possible to do it the other way without additional bits in the mantissa.
After adjusting the exponents, the addition of the two mantissas can still overflow (by one bit), and this gets adjusted down and the exponent goes up by one.
Upvotes: 1