Computational reproducibility
Warm-upHumanWhich of these reports state their evidence honestly? (Choose all that apply.)
Which of these reports state their evidence honestly? (Choose all that apply.)
In IEEE double precision (), let x = 1e16. What does (x + 1) - x evaluate to?
In double precision, 1 - math.cos(1e-8) evaluates to 0.0, although . Which explanation is correct?
Theorem 2 bounds the error of recursive summation by , not by . Why can the bound not be improved to a multiple of ?
Using interval multiplication, compute . What is the lower endpoint of the result?
A program you do not trust outputs: , with certificate , . What can you conclude?
In the Lean module, fsum x δ n is the floating-point recursive sum of x 0, …, x n with rounding errors δ. Which statement correctly formalises Theorem 2?
You want a colleague to be able to regenerate every figure of your paper in five years' time. Which is the best plan?
Implement Kahan's compensated summation kahan_sum(xs). Keep a running sum s and a compensation c for the low-order bits lost so far: for each x, set y = x - c, t = s + y, c = (t - s) - y, s = t. The tests compare your result with the exact rational sum.