Errata, Third Printing (May 2018)


CHAPTER 1

p. 16

Printed: Certain reserved words—such as public, static, int, double, String, true, false, and null
Fixed: Certain reserved words—such as public, static, int, double, true, false, and null
Reported by Paul Orekhov, 19-Sep-18.

p. 24, table

Printed: 1.111 for the result of 3.141 - 2.0
Fixed: 1.141
Reported by Martin Detmer, 29-Sep-20.

p. 27

Printed: beginning of century: (year % 100) == 0
Fixed: end of century: (year % 100) == 0 (technically century begins in xx01)
Reported by Koji Kawamoto, 03-Sep-20.

p. 33

Printed: and then the result of dividing two doubles is a double
Fixed: and then the result of multiplying two doubles is a double
Reported by Miloš Lompar, 23-Dec-21.

p. 46, Exercise 1.2.22

Printed: This value is the displacement in meters
Fixed: This value is the height in meters
Reported by Hanyu Lee, 21-Feb-19.

p. 48, Exercise 1.2.29

Printed: 2500 % 7 = 1
Fixed: 2528 % 7 = 1
Reported by Ed Harcourt, 09-Mar-20.

p. 85, Exercise 1.3.33

Printed: b = 2 sqrt(1 - x^2 - y^2)
Fixed: b = 2y sqrt(1 - x^2 - y^2)
Reported by Raphael Uziel, 09-Jul-22.

p. 120, Exercise 1.4.14

Printed: of a square two-dimensional array
Fixed: of a rectangular two-dimensional array
Reported by Yukai Chou, 18-Oct-19.

p. 130

Printed: Newton (Program 1.3.6)
Fixed: Sqrt (Program 1.3.6)
Reported by Yukai Chou, 31-Oct-19.

p. 171, 178, 186, 188

Printed: tiny.txt
Fixed: tinyG.txt
Reported by Yukai Chou, 31-Oct-19.

p. 183, figure

Printed: pageranks and histogram
Fixed: they correspond to a slightly different graph
Reported by Yukai Chou, 31-Oct-19.


CHAPTER 2

p. 223, Exercise 2.1.27

Printed: Horner's formula
Fixed: the second-to-last right parenthesis should be after the ellipsis
Reported by Yukai Chou, 31-Oct-19.

p. 326, Exercise 2.4.20

Printed: A live cell with exactly one live neighbor becomes dead.
Fixed: A live cell with fewer than two live neighbors becomes dead.
Reported by Julia Yatsenko, 15-Aug-18.


CHAPTER 3

p. 424, Exercise 3.2.26

Printed: second component in product a0 b1 a1 b0 + a2 b3 – a3 b2
Fixed: second component in product a0 b1 + a1 b0 + a2 b3 – a3 b2
Reported by Steve Kroon, 27-Mar-19.

p. 481, figure

Printed: Directions of vectors delta, delta.direction() and a.forceFrom(b) point toward a
Fixed: Should point toward b (to match code)
Reported by Ivan Zh, 24-Apr-20.


CHAPTER 4

p. 534, Program 4.2.1 Trace

Printed: false true true false false true false
Fixed: true false false true true false true
Reported by Gyoonho Kong, 06-Apr-20.

p. 536

Printed: the sequence of answers no yes yes no no yes no
Fixed: the sequence of answers yes no no yes yes no yes
Reported by Ivan Zh, 25-Apr-20.


CHAPTER 5

p. 729

Printed: bbbbbbbba [Yes]
Fixed: bbbbbbbba [No]
Reported by Travis Bickle, 08-Jun-20.

p. 747

Printed: As before, a-transitions from {0, 2}
Fixed: As before, b-transitions from {0, 2}
Reported by Yang Zheng, 20-Dec-18.

p. 749

Printed: 01, 01, 12 (two-state subsets)
Fixed: 01, 02, 12 (two-state subsets)
Reported by Yang Zheng, 21-Dec-18.

p. 853

Printed: a boolean array inSubset[] of length m
Fixed: a boolean array inSubset[] of length n
Reported by Yang Zheng, 30-Dec-18.


CHAPTER 6

p. 889

Printed: 10, 23, and 53 bits for binary16, binary32, and binary64, respectively.
Fixed: 10, 23, and 52 bits for binary16, binary32, and binary64, respectively.
Reported by Kumar Ravi, 29-Oct-18.

p. 891

Printed: 0b11111111111111111111111111111111
Fixed: 0b00000000000000000000000000001111
Reported by Tom Kenny, 16-May-19.

p. 910

Printed: the TOY instruction 1234 says to direct the contents of R[2] and R[3] to the ALU, add them, and then direct the result to R[4]
Fixed: the TOY instruction 1234 says to direct the contents of R[3] and R[4] to the ALU, add them, and then direct the result to R[2]
Reported by Benjamin Strekha, 28-Feb-20.

p. 919

Printed: Then we use the conditional branch C0xx
Fixed: Then we use the conditional branch C1xx
Reported by Gilad Barach, 16-Sep-19.

p. 928, Exercise 6.2.12

Printed: only if either or both bits are 0
Fixed: only if both bits are 0
Reported by Tom Kenny, 16-May-19.

p. 956, Exercise 6.3.35

Printed: 97: C41B
Fixed: 97: C499
Reported by Tom Kenny, 16-May-19.

p. 956, Exercise 6.3.35

Printed: 99: D293 (R[2] == 0)
Fixed: 99: D293 (R[2] > 0)
Reported by Tom Kenny, 16-May-19.

p. 956, Exercise 6.3.35

Printed: 9A: FF00
Fixed: 9A: EF00
Reported by Tom Kenny, 16-May-19.

p. 991, table

Printed: the column for the first occurrence of y' is 1 1 1 0
Fixed: it should be 1 0 1 0
Reported by Benjamin Strekha, 29-Apr-20.

p. 1028, paragraph 2

Printed: y3 y2 y1 y3
Fixed: y3 y2 y1 y0
Reported by Gilad Barach, 29-Sep-19.

p. 1028, paragraph 2

Printed: then add that carry to the two 1 inputs at the third position from the right to get an output bit of 1 and a 1 carry
Fixed: then add that carry 0 to the two 1 inputs at the third position from the right to get an output bit of 0 and a 1 carry
Reported by Gilad Barach, 29-Sep-19.

p. 1081 and 1086, diagram

Printed: circuit connects EXECUTE WRITE to HALT instruction
Fixed: circuit should connect EXECUTE to HALT instruction
Reported by Fabio Carriel Fonseca, 20-Feb-19.


CHAPTER 7

No errata reported at this time.


APPENDIX

No errata reported at this time.