Errata, Second Printing (December 2016)


CHAPTER 1

p. 65

Printed: java HarmonicNumber 10000
Fixed: java HarmonicNumber 1000
Reported by Anonymous, 30-Dec-17.


CHAPTER 2

p. 217–218

Printed: sum()
Fixed: superpose()
Reported by Sophia Gavrilenko and Georgy Noarov, 07-Apr-17.


CHAPTER 3

p. 330

Printed: Java's primitive types represent numbers.
Fixed: Except for boolean, Java's primitive types represent numbers.
Reported by John Spurgeon, 15-Jan-18.

p. 394

Printed: create a new turtle at (x0, yo)
Fixed: create a new turtle at (x0, y0)
Reported by Timothy Ruszala, 15-Nov-16.


CHAPTER 4

p. 515, String memory diagram

Printed: 40 bytes + char array (2n + 24 bytes)
Fixed: 32 bytes + char array (2n + 24 bytes)
Reported by Junjie Yin, 07-May-19.

p. 520

Printed: java -Xmx1100mb
Fixed: java -Xmx1100m
Reported by Sergey Vaysman, 21-Feb-17.

p. 533

Printed: If so, look for the number in [lo, mid); if not, look for the number in [mid, hi).
Fixed: If so, look for the number in [mid, hi); if not, look for the number in [lo, mid).
Reported by Max Palmer, 27-Apr-17.

p. 534, Program 4.2.1

Printed: binarySearch(lo, mid) and binarySearch(mid, hi)
Fixed: binarySearch(mid, hi) and binarySearch(lo, mid)
Reported by Sergey Vaysman, 22-Feb-17.


CHAPTER 5

p. 726

Printed: (a|b|c|...|z)*spb(a|b|c|...|z)
Fixed: (a|b|c|...|z)*spb(a|b|c|...|z)*
Reported by Ibrahim Albluwi, 30-Nov-16.

p. 730

Printed: \( matches )
Fixed: \( matches (
Reported by Ibrahim Albluwi, 22-Nov-16.

p. 770

Printed: changing 1s to 0s until you encounter a 0, then change that 0 to 1.
Fixed: changing 0s to 1s until you encounter a 1, then change that 1 to 0.
Reported by Yang Song, 12-Dec-16.

p. 772, figure

Printed: tabular representation of TM has no column for symbol '+'
Fixed: add a column for symbol '+'
Reported by Alison Heilbronner, 28-Nov-16.

p. 823

Printed: that can be described by any physically realizable computing device.
Fixed: that can be efficiently performed by any physically realizable computing device.
Reported by Tristan Pollner, 11-Dec-16.


CHAPTER 6

No errata reported at this time.


CHAPTER 7

p. 997, figure

Printed: x'yz + xy'z + xyz' + xyz (formula for majority)
Fixed: xyz + xy'z' + x'yz' + x'y'z (formula for odd parity)
Reported by Wouter Van Gijseghem, 11-Dec-16.


APPENDIX

No errata reported at this time.