A135 of 55
0 XP
  1. Hook
  2. Problems

A13 · Problem set 1

Problem set 1: floating point, error and simple iterations

These problems use lessons 1 to 4: floating-point formats and spacing, rounding and cancellation, conditioning and stability, bisection and fixed-point iteration. Double precision has 53 significant bits.

Check

Doubles near x = 5000.

(a)

What's the spacing between neighbors there?

(b)

What's that spacing relative to x?

Check

A format has 16 significant bits.

(a)

What's its machine epsilon?

(b)

Above what integer does it first skip integers?

Check

A float32 running total adds 0.03 each step.

(a)

From what total does an addition stop changing it?

(b)

And for a double running total?

Check

Subtracting b = 1 from a = 1 + 0.0001.

(a)

By about what factor does the relative error grow?

(b)

About how many decimal digits does that cost?

Check

x2−1000000x+2=0.

(a)

What's the small root?

(b)

What's the large root?

Check

Condition numbers.

(a)

What's κ for ln⁡x at x = 1 + 0.0001?

(b)

What's κ for ex at x = 10?

Check

Stability and conditioning.

(a)

A system has κ=104. About how many digits can a stable solver deliver?

(b)

The series for e−15 has terms up to what size?

Check

Bisection on a bracket 1 wide.

(a)

How many steps guarantee an error below 0.0001?

(b)

What's the guaranteed error after 20 steps?

Check

The iteration x←4+1/x.

(a)

What does it converge to?

(b)

By what factor does each step shrink the error?

Check

A linear iteration with rate 0.2.

(a)

About how many steps for 9 digits?

(b)

If the last step changed x by 1 unit, about how far is x from the answer, in those units?

Check

A 5 V source drives a diode (Is=10−14 A, nVT = 25.85 mV) through 1000 Ω.

(a)

What's VD after one step from 0.7 V of VD←nVTln⁡((V−VD)/RIs+1)?

Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.

(b)

What's |g′| near there, nVTV−VD, with VD ≈ 0.7 V?

Check

x2+1−x at x = 5 × 10⁸.

(a)

What's its true value?

(b)

What does double precision give when it's computed as written?

Have paper and a calculator ready. Work each problem out by hand, then enter the answer. Your first try on each one counts toward your score.

Practice

Keep practicing

15 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.