« previous | Thursday, January 16, 2014 | next »
Floating Points
64 bits
0
|
1 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1
|
1 |
0 |
1 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
... |
0
|
(sign)
|
(exponent; 11 bits)
|
(fractional part; 52 bits)
|
Bisection Algorithm
Binary search for a zero point between and by checking sign of midpoints.
Section 2.2: Fixed Point Iteration
Banach 1923
Given equation , rewrite as a function
For example is rewritten as .
- Take
- Iterate: for
if converges to as , then is a fixed point such that .
This is only useful if you know an interval where a fixed point must exist.
e.g. choosing causes the iteration to diverge to .
Theorem 2.3
Given , where and is continuous on ,
- If for any , then there exists a such that .
- If there exists a such that for all , then is unique.
quod erat demonstrandum
Example
. Find zero :
- for
Find a ...
"Stupid change": (). This is because is not within .
Another try: . May work, but prof. doesn't like it.
Yet another try: . Observe this function is within . More importantly, for . In fact, . Therefore, will converge:
Theorem. If ; for all ; is any number in ; and , then
- for
Proof.
After interations, we have . This proves (1).
Now if we have , then
For any consecutive and , we get
Thus the distance above can be better estimated as
This proves (2).
quod erat demonstrandum
In many cases (for good guesses), the second estimate will be better than the first
Goal