Solution (source code)

= Solution

<Round-off error> arises from representing numbers and carrying out arithmetic at finite precision: storing $1/3$ or subtracting nearly equal numbers can lose information even when the mathematical algorithm is exact. <Truncation error> arises from replacing a continuous or infinite mathematical operation by a finite approximation, such as discarding higher <Taylor series> terms in a <finite difference>. Refining a grid usually reduces <truncation error> but may increase accumulated <round-off error>; the two have different origins.