The two weighings are almost the same. Can we tell how much is missing by subtracting them?
First write down the two readings and then see how rounding changes that small difference.
General Algorithms and Numerical Computing
You want to know how much weight a bag loses before and after, so you weigh it twice and subtract the numbers. If the last few bits are omitted when recording, small changes may be erased. Here, two numbers in the book are borrowed as kilogram readings, and only an ideal numerical experiment is conducted: the measurement error of the real scale is not simulated.
Guess first
Both weighing records say 6.927 kg. Can we conclude that the two weights are completely equal?
Show answer and explanation
No, the end may have been dropped. — Identical records only indicate that the reserved bits are identical; smaller differences may be hidden by rounding.
Then connect experience and science
Let’s look at the original difference first
Take two numbers from the book. They are both close to 7, but what we want to know is the separation of about 0.00002 between them.
6.9273649 − 6.9273451 = 0.0000198
Let the input be rounded first
Drag to retain the number of digits. The two numbers are rounded separately, and the missing parts at the end are not the same.
First round a and b, then calculate a − b
Locally magnify the difference
The upper part is the original difference and the lower part is the rounded difference. The input may seem just a little off, but the relative error in the result may be huge.
Relative error = |estimated difference − original difference | / original difference
The number of display digits cannot be retrieved.
Writing 0.00001 as 0.000010000000 does not restore the lost input. Precision is preserved in calculations and rounded when displayed.
More decimals ≠ smaller error
Expand the calculation
Δ = a − b Δ舍入 = round(a) − round(b) relative error = |Δ舍入 − Δ| / |Δ|
Round here means rounding to the selected significant digits. When the two numbers are close, rounding separately will lose the information in the difference; when Δ=0, this relative error formula cannot be used.
give it a try
First select "Remember only four digits", then select "Remember six digits" and "Keep the original number". The original value of the bag remains unchanged twice, what changes is just how many digits you write down.
No need to memorize symbols
- Significant figures
- Counting from the first non-zero digit, distinguished by the number of decimal places
- a − b
- The difference that this lesson focuses on
- relative error
- The ratio of the error to the original difference, expressed as a percentage on the interface
Algorithm, accuracy and scope of application
Reproduce the decimal rounding example from Chapter 2 Printed Page 16. The original difference is expressed as an integer ratio 198/10000000 to avoid using the same floating point subtraction as the true value. The slider simulates decimal significand rounding and does not simulate a full hardware floating point format. This lesson does not correspond to AA+ special functions, and the values are verified by integer decimal independent routes. The horizontal axis of the graph only draws the difference, not the position of the original value. Scenario description: Borrowing the original numbers 6.9273649 and 6.9273451 from Meeus Chapter 2 and assigning kg as a teaching situation; not an actual weighing report, nor does it claim that real scales have these valid digits. Only decimal record rounding is simulated here, and no instrument noise or error is added.
my understanding check
What changed in the experiment when the record was changed from four to six digits?
numbers retained — The two original numbers don't change; what changes is how finely we record them.
6.92736 kg minus 6.92735 kg, how many milligrams is it?
10 mg — The difference is 0.00001 kg. 1 kg = 1,000,000 mg, so 10 mg.
If a real scale shows many decimals, does it necessarily mean the measurement is equally accurate?
uncertain — Display digits do not equal measurement accuracy; instrument calibration, noise, and measurement conditions also introduce errors. This lesson only demonstrates rounding.
The worst thing about small differences is that the input will be rounded off first; writing a few more zeros will not make up for the lost information.
Jean Meeus · Astronomical Algorithms, 2nd ed. · No. 2 chapter
General Algorithms and Numerical Computing · All interactive courses