3.7 Answers to Exercises ======================== This section includes answers to all the exercises in the Calc tutorial.
· RPN Answer 1 1 <RET> 2 <RET> 3 <RET> 4 + * - · RPN Answer 2 2*4 + 7*9.5 + 5/4 · RPN Answer 3 Operating on levels 2 and 3 · RPN Answer 4 Joe’s complex problems · Algebraic Answer 1 Simulating Q command · Algebraic Answer 2 Joe’s algebraic woes · Algebraic Answer 3 1 / 0 · Modes Answer 1 3#0.1 = 3#0.0222222? · Modes Answer 2 16#f.e8fe15 · Modes Answer 3 Joe’s rounding bug · Modes Answer 4 Why floating point? · Arithmetic Answer 1 Why the \ command? · Arithmetic Answer 2 Tripping up the B command · Vector Answer 1 Normalizing a vector · Vector Answer 2 Average position · Matrix Answer 1 Row and column sums · Matrix Answer 2 Symbolic system of equations · Matrix Answer 3 Over-determined system · List Answer 1 Powers of two · List Answer 2 Least-squares fit with matrices · List Answer 3 Geometric mean · List Answer 4 Divisor function · List Answer 5 Duplicate factors · List Answer 6 Triangular list · List Answer 7 Another triangular list · List Answer 8 Maximum of Bessel function · List Answer 9 Integers the hard way · List Answer 10 All elements equal · List Answer 11 Estimating pi with darts · List Answer 12 Estimating pi with matchsticks · List Answer 13 Hash codes · List Answer 14 Random walk · Types Answer 1 Square root of pi times rational · Types Answer 2 Infinities · Types Answer 3 What can "nan" be? · Types Answer 4 Abbey Road · Types Answer 5 Friday the 13th · Types Answer 6 Leap years · Types Answer 7 Erroneous donut · Types Answer 8 Dividing intervals · Types Answer 9 Squaring intervals · Types Answer 10 Fermat’s primality test · Types Answer 11 pi * 10^7 seconds · Types Answer 12 Abbey Road on CD · Types Answer 13 Not quite pi * 10^7 seconds · Types Answer 14 Supercomputers and c · Types Answer 15 Sam the Slug · Algebra Answer 1 Squares and square roots · Algebra Answer 2 Building polynomial from roots · Algebra Answer 3 Integral of x sin(pi x) · Algebra Answer 4 Simpson’s rule · Rewrites Answer 1 Multiplying by conjugate · Rewrites Answer 2 Alternative fib rule · Rewrites Answer 3 Rewriting opt(a) + opt(b) x · Rewrites Answer 4 Sequence of integers · Rewrites Answer 5 Number of terms in sum · Rewrites Answer 6 Truncated Taylor series · Programming Answer 1 Fresnel’s C(x) · Programming Answer 2 Negate third stack element · Programming Answer 3 Compute sin(x) / x, etc. · Programming Answer 4 Average value of a list · Programming Answer 5 Continued fraction phi · Programming Answer 6 Matrix Fibonacci numbers · Programming Answer 7 Harmonic number greater than 4 · Programming Answer 8 Newton’s method · Programming Answer 9 Digamma function · Programming Answer 10 Unpacking a polynomial · Programming Answer 11 Recursive Stirling numbers · Programming Answer 12 Stirling numbers with rewrites