Exercise · Volume 1 · 1.2.2-26
Exercise 1.2.2-26
not stated yet in Lean solution written
| Rating | M27 |
|---|---|
| Markers | M (mathematical) |
| Kind | K4, find an estimate: give an asymptotic form or a bound from the written solution |
| Section | Section 1.2.2 of Volume 1. Companion chapter: Numbers, powers and logarithms |
The task
Give a rigorous upper bound for the error of the algorithm of Exercise 1.2.2-25, in terms of the number of bits used.
The exact wording is in your copy of the book.
Hints
Open one hint at a time. Try the exercise again after each.
Hint 1
Express the new of step L4 with the cut error of Exercise 1.2.2-25, and write down how the logarithm of changes.
Hint 2
Sum these changes over all the executions of L4. Telescope.
Hint 3
Count the executions of L4 by looking at how the interval for shrinks when grows.
Solution
Show the solution
Use the setting and the symbols of Exercise 1.2.2-25. Let the table entry in use be with . This includes the rounding of the table and the rounding of the additions to . Let be the number of executions of L4, and let be the input.
Error of one step. At the th execution of L4 with index , the new value is with . Since the new value is at least , . So and . The last step uses for .
Sum. The final is , so . The result is , hence and therefore
Count of . With the step L4 runs only if . This happens only for , and then the new is and the run ends, so it counts at most once. Let and take the first time L4 runs with this . It is reached from L3, so the test at index failed to pass: , which gives . As and , . Each execution with this lowers by : for , , and for , . Since stays at least , the number of executions with this has , so . There are values , hence .
With an exact table () the bound reads .
Check
A python run with , and exact table values, over all inputs with , gives errors between and , always below , with at most executions of L4. The proved bound is far from sharp, since the count is a crude worst case.
Remarks
The true number of executions is close to , so the error is about in practice. The bound shows only that the loss is a small multiple of the precision, which is the point of the exercise.
This solution is checked, and a person has not reviewed it yet. The source.
In Lean
not stated yet The exercise is not stated in Lean yet.
The status is computed from the Lean build. The node of the map.
Something is wrong? Report it.