# Floating-point arithmetic and loss of precision: Shifting mantissa until exponents match

My book says the following about floating-point arithmetic involving the addition/subtraction of two numbers, $$x$$ and $$y$$, that differ in their exponent:

In adding or subtracting two floating-point numbers, their exponents must match before their mantissas can be added or subtracted. If they do not match initially, then the mantissa of one of the numbers must be shifted until the exponents do match.

The book gives the following example:

I'm having trouble making sense of any of this. I think I do this intuitively without thinking about it, but I'm unable to justify what goes on when we add $$1.92403 * 10^2$$ to $$6.35782 * 10^-1$$. What are the intermediate steps that the book is skipping over? Don't we have to factor out (or introduce) powers of 10 to compensate?

\begin{align}x+y&=1.92403\cdot 10^2+6.35782\cdot 10^{-1}\\&=1.92403\cdot 10^2+0.00635782\cdot 10^{2}\\ &\approx 1.92403\cdot 10^2+0.00636\cdot 10^{2}\\ &=(1.92403+0.00636)\cdot 10^2\\ &=1.93039\cdot 10^{2}\end{align}
• Oh, it's like multiplying and dividing $y$ by $10^3$, but distributing those to the mantissa and $10^{exp}$, such that the mantissa becomes smaller while the exponent becomes larger. The result remains the "same" from our perspective, but in terms of precision, we have effectively lost the "8" and the "2" from $y$ because it is assumed that our computations are only as accurate as the lowest precision of the inputs (6 significant digits). Did I understand this correctly? Sep 5, 2019 at 20:06