Page 39: the output from running the program should be not should be must be larger than 1000, typi ally maxmin( os, -pi / 2, 2 pi, 100001) will result in as output. Page 277: a 6 megapixel amera stores 3x6 10 = 18 megabytes line is then missing: per pi ture (3 bytes with 256 values of red, green, and blue per pixel)
Page 39: the output from running the program should be not should be must be larger than 1000, typi ally maxmin( os, -pi / 2, 2 pi, 100001) will result in as output. Page 277: a 6 megapixel amera stores 3x6 10 = 18 megabytes line is then missing: per pi ture (3 bytes with 256 values of red, green, and blue per pixel)
Direitos autorais:
Attribution Non-Commercial (BY-NC)
Formatos disponíveis
Baixe no formato PDF, TXT ou leia online no Scribd
Page 39: the output from running the program should be not should be must be larger than 1000, typi ally maxmin( os, -pi / 2, 2 pi, 100001) will result in as output. Page 277: a 6 megapixel amera stores 3x6 10 = 18 megabytes line is then missing: per pi ture (3 bytes with 256 values of red, green, and blue per pixel)
Direitos autorais:
Attribution Non-Commercial (BY-NC)
Formatos disponíveis
Baixe no formato PDF, TXT ou leia online no Scribd
A Primer on S
ienti
Programming with Python by H. P. Langtangen
Simple typos are not reported in the list below only more serious errors that may lead to
onfusion.
1. Page 39: The output from running the program should be y =
1.6 m, not y = 0.7 m. 2. Page 103, Exer
ise 2.18: (x1 , y2 ) should be (x1 , y1 ). 3. Page 105, Exer
ise 2.26: To get exa
tly (−1.0, 1.0) as output, n must be larger than 1000, typi
ally maxmin(
os, -pi/2, 2*pi, 100001) will result in (−1.0, 1.0) as output. 4. Page 106, Exer
ise 2.32: There are n+1 roots and the polynomial is of degree n+1 (not n). 5. Page 108, Exer
ise 2.38: c0 = 1, not 0. 6. Page 228, Exer
ise 4.13: Sin
e the program has a darker blue left margin, the program is supposed to be
omplete, but an initial from s
itools.std import *. line is then missing: 7. Page 231, Exer
ise 4.23: t ∈ 2vg0 should read t ∈ [0, 2vg0 ]. 8. 6 Page 277: A 6 megapixel
amera stores 3×6·10 = 18 megabytes per pi
ture (3 bytes with 256 values of red, green, and blue per pixel). 9. Page 327, Exer
ise 6.14: The le human_evolution.txt was unfor- tunately in UTF-8 format, and not plain ASCII format, in early distributions of the book-examples.tar.gz le with the software from the book. 10.Page 328, Exer
ise 6.17: The formula dp[j-1℄ = k*p[j℄ should be dp[j-1℄ = j*p[j℄. 11.Page 405, Exer
ise 7.24: The referen
e to Exer
ise 9.25 is not inappropriate, but unne
essary repla
ing Exer
ise 9.95 by Exer
ise B.7 makes more sense. 12.Page 407, Exer
ise 7.27: N
orresponds to a 2nd-order Runge- Kutta method should read N = 2
orresponds to a.... It is not (7.18) that is to be repeated until the
hange in vq is small, but formula (7.17). 13.Page 408, Exer
ise 7.30: PDE should read ODE. 14.Page 497, Chapter 9.2.6: The formula (9.7) la
ks a fa
tor Pr P h−1 , i.e., it should read h i=−r wi f (xi ). Sums i wi f (xi ) in the −1
running text must also have a fa
tor h
−1 in front.
15.Page 540, se
ond line in Problem paragraph: The interval [a, n]
should be [a, b]. 16.Page 554, Exer
ise 9.23: The last fun
tion, expressing the exa
t solution, should read u(t) = e−at . 17.Page 554, Exer
ise 9.25: The page referen
e to Exer
ise B.7 is 623, not 554. Last line: the (0) after h should be removed. 18.Page 554, Exer
ise 9.25: The referen
e to page 554 should be to page 623 instead. 19.Page 563, Exer
ise 9.46: The expression for the potential energy Ru in a string reads P = 0s(v)dv (= 12 u2 for a linear spring, s(v) = v ), i.e., the m parameter should not enter any expression for P . 20.Page 566, Exer
ise 9.49: The referen
es to Exer
ise 9.46 are wrong the referen
es are to Exer
ise 9.47. 21.Page 569, Exer
ise 9.50: A parenthesis is missing in the expres- sion for the Bump for
e. The
orre
t expression is F (t) = H(t − t1 )(1 − H(t − t2 ))F0 . 22.ODE solvers in Chapters 7 and 9: the
lass implementations of the solve method must have a while loop with while t < T and not while t <= T for unew at t=T to be the last
omputed value (while t <= T
omputes unew at T+dt).