Lecture 6 Flashcards

1
Q

Find decay f(n)=error (semilogy)

A

exponential function decay y=base^{⍺.n}
log(y) = ⍺.n.log(base) = ⍺n (if log same base)
⍺=Δy/Δx=(log(y2)-log(y1))/(x2-x1)
or ⍺= Δy/(log(base).Δx)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Find decay f(n)=error

A

power function decay n^{b}
e=an^b
log(e) = log(a)+b.log(n)
b=Δy/Δx…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Algebraic convergence vs. growth

A

error = O(1/n^⍺) vs. O(n^⍺), power functions, ⍺ algebraic index of convergence. Straight line in a loglog plot.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Exponential convergence vs. growth

A

error = O(e^-{⍺n}) vs. O(n^{⍺n}), exponential functions. Straight line in a semilogy plot. Much faster than algebraic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Taylor degree 3 at x0=12. For h1=0.5 you get a truncation error e1=10^-4. What’s the error e2 for h2=0.25?

A

Error = O(h^4)
e1 = c.h1^4
e2 = c.h2^4
So e2 = 10^-4 (h2/h1)^4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Taylor app derivatives

A

Need to increase degree and derivate Taylor app

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Taylor app integral f(x)

A

∑(0→∞) f^(i)(0)/i! ∫(s→t)x^i dx = ∑(0→∞) f^(i)(0)/i! (t^{i+1}-s^{i+1})/(i+1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Number representation in a β-system

A

(an…a1 a0.b1 b2…)β = ∑(0→n) ak.β^k + ∑(1→∞) bk.β^-k

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Python int to bin, bin to int

A
bin(15) = '0b1111'
int(0b1111) = 15
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Consider a (binary) floating point system of the form (1.b1b2b3b4b5b6) x 2^m, m \in {-128,127}. Which is the largest k s.t. all integers [-k,k] can be represented?

A

Max : 1.111111 x 2^6 = 1111111 = 2^7 = 128

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Subnormal Numbers: IEEE single precision numbers store 23 bits in the fraction. The smallest possible exponent value in the format is −126.
If you want to store a number x<2^{−131}, what is the largest possible number of significant bits in the machine representation of your number?

A

0.000001… x 2^126 (LESS than 2^{-131}), so at most 23-5 = 18 significant bits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly