# The NumFuzz benchmarks with roundoff: figure captions

Written by `scripts/plot.py`; do not edit by hand. Every figure is `NAME.png` (9 inches wide at 200 dpi) and `NAME.svg`. An image holds only the plot, its axes with units, a legend with short series names and panel letters; the caption says what the figure shows, what was measured, in which unit, on which scales, where and when. The notes say how, which numbers come from Lean and which from scripts, and give the numbers behind the marks.

## Figure 1: `01-bounds-and-time`

![Two panels sharing 17 rows, one per program, each row holding up to four markers one above the other. In the left panel the FloatLib circles lie between 2 and 20 units; they sit on the NumFuzz squares in 13 rows and left of them in 4, and the Gappa diamonds sit on them in 10 rows and left of them in 7. The FPTaylor triangles lie right of the circles in 13 rows, on them in 1 and left of them in 2; in 7 of those rows they are open triangles at the right edge, and 1 more row has a cross there. In the right panel the NumFuzz squares stand between 0.002 and 0.008 seconds, the Gappa diamonds between 0.034 and 2.2, the FPTaylor triangles between 3.2 and 109 and the FloatLib circles between 1.7 and 68.](01-bounds-and-time.svg "Relative error bounds and analysis times of the 17 small benchmarks of the NumFuzz paper (its Table 3): FloatLib's `roundoff` against the published numbers of NumFuzz, Gappa and FPTaylor. Panel (a) gives each tool's bound on the relative error in units of 2^-52, the unit roundoff of binary64 rounded toward plus infinity, and panel (b) the time of each analysis in seconds; both axes are logarithmic, and left is tighter in (a) and faster in (b). FloatLib's bound is the one Lean accepted on the box [0.1, 1000] that the paper gave Gappa and FPTaylor, and its time is Lean's elaboration of the forward theorem and of that bound, measured on 2026-11-21 on an Intel Xeon Platinum 8275CL (96 threads, shared with other jobs) with Lean 4.36.0 on FloatLib. The other tools' numbers are the paper's, measured on a MacBook with a 1.4 GHz processor.")

**Figure 1.** Relative error bounds and analysis times of the 17 small benchmarks of the NumFuzz paper (its Table 3): FloatLib's `roundoff` against the published numbers of NumFuzz, Gappa and FPTaylor. Panel (a) gives each tool's bound on the relative error in units of 2^-52, the unit roundoff of binary64 rounded toward plus infinity, and panel (b) the time of each analysis in seconds; both axes are logarithmic, and left is tighter in (a) and faster in (b). FloatLib's bound is the one Lean accepted on the box [0.1, 1000] that the paper gave Gappa and FPTaylor, and its time is Lean's elaboration of the forward theorem and of that bound, measured on 2026-11-21 on an Intel Xeon Platinum 8275CL (96 threads, shared with other jobs) with Lean 4.36.0 on FloatLib. The other tools' numbers are the paper's, measured on a MacBook with a 1.4 GHz processor.

Alt text: Two panels sharing 17 rows, one per program, each row holding up to four markers one above the other. In the left panel the FloatLib circles lie between 2 and 20 units; they sit on the NumFuzz squares in 13 rows and left of them in 4, and the Gappa diamonds sit on them in 10 rows and left of them in 7. The FPTaylor triangles lie right of the circles in 13 rows, on them in 1 and left of them in 2; in 7 of those rows they are open triangles at the right edge, and 1 more row has a cross there. In the right panel the NumFuzz squares stand between 0.002 and 0.008 seconds, the Gappa diamonds between 0.034 and 2.2, the FPTaylor triangles between 3.2 and 109 and the FloatLib circles between 1.7 and 68.

Notes: FloatLib's model here is the one the three tools analyze: real inputs, and each operation of the program rounded toward plus infinity to binary64 (`Model.roundAt FloatFormat.binary64 t .up`), with underflow kept as an absolute term and no overflow. `roundoff mixed theorem` proves a mixed bound for all inputs of the box; a second theorem, proved from it with FloatLib's `interval` tactic and the suite's lemmas, states |computed - exact| <= B |exact| with a number B that a script proposes and Lean accepts or refuses. Lean accepted the first proposal for all 17 programs. Against NumFuzz, FloatLib's bound is smaller in 4 programs, equal (within 0.5 percent) in 13 and larger in 0; the ratio FloatLib / NumFuzz runs from 0.67 to 1.00. Against Gappa it is smaller in 0, equal in 10 and larger in 7; the ratio runs from 1.00 to 2.00. Against FPTaylor (16 programs with a bound) it is smaller in 13, equal in 1 and larger in 2. NumFuzz's bound holds for all positive inputs and assumes no underflow or overflow; FloatLib's, Gappa's and FPTaylor's hold on the box. FPTaylor's bounds beyond the axis (open triangles at the right edge, as relative errors): one_by_sqrtxx 5.09e-13; predatorPrey 4.21e-11; Horner2 6.49e-11; Horner2_with_er 1.61e-10; Horner5 0.162; Horner10 1.14e+13; Horner20 2.53e+43. The cross marks the program for which the paper reports that FPTaylor failed (x_by_xy). FloatLib's time is 1.7 to 68 seconds per program (median 2.8) for the forward theorem and the relative bound together, of which the forward theorem alone takes 0.39 to 3.1 seconds; it is Lean's elaboration time inside one process, as NumFuzz's and FPTaylor's times are the ones those tools print, while Gappa's is the wall-clock time of its process. The whole Lean process, with start-up and the import of FloatLib and Mathlib, takes 5.8 to 72 seconds. The numbers behind the marks (bounds as relative errors):

| program | FloatLib | NumFuzz | Gappa | FPTaylor | FloatLib / NumFuzz | FloatLib / Gappa | FloatLib (s) | of it forward (s) | process (s) |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| hypot | 4.4409e-16 | 5.55e-16 | 4.46e-16 | 5.17e-16 | 0.80 | 1.00 | 2.7 | 0.8 | 6.9 |
| x_by_xy | 4.4409e-16 | 4.44e-16 | 2.22e-16 | fail | 1.00 | 2.00 | 2.6 | 0.9 | 6.9 |
| one_by_sqrtxx | 5.5512e-16 | 5.55e-16 | 3.33e-16 | 5.09e-13 | 1.00 | 1.67 | 2.1 | 0.6 | 6.1 |
| sqrt_add | 7.7716e-16 | 9.99e-16 | 5.54e-16 | 6.66e-16 | 0.78 | 1.40 | 3.2 | 0.9 | 7.2 |
| test02_sum8 | 1.5544e-15 | 1.55e-15 | 1.55e-15 | 9.32e-14 | 1.00 | 1.00 | 4.0 | 0.6 | 7.7 |
| nonlin1 | 4.4409e-16 | 4.44e-16 | 2.22e-16 | 4.49e-16 | 1.00 | 2.00 | 1.7 | 1.2 | 5.8 |
| test05_nonlin1 | 4.4409e-16 | 4.44e-16 | 2.22e-16 | 4.46e-16 | 1.00 | 2.00 | 2.3 | 1.1 | 6.7 |
| verhulst | 8.8818e-16 | 8.88e-16 | 4.44e-16 | 7.38e-16 | 1.00 | 2.00 | 2.8 | 0.7 | 7.1 |
| predatorPrey | 1.5544e-15 | 1.55e-15 | 8.88e-16 | 4.21e-11 | 1.00 | 1.75 | 3.0 | 0.7 | 6.7 |
| test06_sums4_sum1 | 6.6614e-16 | 6.66e-16 | 6.66e-16 | 6.71e-16 | 1.00 | 1.00 | 2.0 | 0.5 | 6.8 |
| test06_sums4_sum2 | 4.4409e-16 | 6.66e-16 | 4.44e-16 | 1.78e-14 | 0.67 | 1.00 | 1.9 | 0.4 | 6.1 |
| i4 | 4.4409e-16 | 4.44e-16 | 4.44e-16 | 4.50e-16 | 1.00 | 1.00 | 3.4 | 0.7 | 8.5 |
| Horner2 | 4.4409e-16 | 4.44e-16 | 4.44e-16 | 6.49e-11 | 1.00 | 1.00 | 2.7 | 0.4 | 7.1 |
| Horner2_with_er | 1.1103e-15 | 1.55e-15 | 1.11e-15 | 1.61e-10 | 0.72 | 1.00 | 3.2 | 0.5 | 7.9 |
| Horner5 | 1.1103e-15 | 1.11e-15 | 1.11e-15 | 1.62e-01 | 1.00 | 1.00 | 5.5 | 1.0 | 9.8 |
| Horner10 | 2.2205e-15 | 2.22e-15 | 2.22e-15 | 1.14e+13 | 1.00 | 1.00 | 10.7 | 1.0 | 14.8 |
| Horner20 | 4.4409e-15 | 4.44e-15 | 4.44e-15 | 2.53e+43 | 1.00 | 1.00 | 67.9 | 3.1 | 72.2 |

From Lean: FloatLib's bounds (each is the statement of a theorem that depends only on propext, Classical.choice and Quot.sound) and its times. From scripts: the proposal of each bound, the ratios and the transcription of the paper's Table 3 (arXiv:2405.04612v2). Source: `results/programs.csv`.

Files: `01-bounds-and-time.png`, `01-bounds-and-time.svg`.

## Figure 2: `02-sums-horner-dot`

![Three panels with logarithmic axes and one blue line each, rising one for one with the size: from 2 to 100 fused multiply-adds, from 4 to 128 pairs and from 7 to 1,023 additions. In the first and third panels the circles on the line sit inside the NumFuzz squares at every size that has one, inside Gappa diamonds at the small sizes and under textbook plus signs at the large ones; open triangles at the top edge of the first panel mark FPTaylor's bounds, and one FPTaylor triangle stands far above the line at the small sum. In the middle panel the plus signs sit on the circles and the NumFuzz squares lie about a factor two above the line.](02-sums-horner-dot.svg "Relative error bounds of the three families of long programs in the NumFuzz benchmarks, against their size: (a) Horner's rule with one fused multiply-add per coefficient, (b) the dot product behind each entry of a matrix product, (c) the serial sum. The line is FloatLib's theorem for every size, proved once by `roundoff` on the program written as a loop, and its circles are the sizes of the benchmarks; the other marks are the published bounds of NumFuzz, Gappa and FPTaylor and the textbook bounds that the paper quotes. Bounds are in units of 2^-52, both axes are logarithmic, and lower is tighter. FloatLib's bounds hold for nonnegative binary64 inputs when no operation overflows, with the underflow of the products and fused operations kept as a separate absolute term; they come from Lean 4.36.0 on FloatLib, run on 2026-11-21 on an Intel Xeon Platinum 8275CL (96 threads, shared with other jobs).")

**Figure 2.** Relative error bounds of the three families of long programs in the NumFuzz benchmarks, against their size: (a) Horner's rule with one fused multiply-add per coefficient, (b) the dot product behind each entry of a matrix product, (c) the serial sum. The line is FloatLib's theorem for every size, proved once by `roundoff` on the program written as a loop, and its circles are the sizes of the benchmarks; the other marks are the published bounds of NumFuzz, Gappa and FPTaylor and the textbook bounds that the paper quotes. Bounds are in units of 2^-52, both axes are logarithmic, and lower is tighter. FloatLib's bounds hold for nonnegative binary64 inputs when no operation overflows, with the underflow of the products and fused operations kept as a separate absolute term; they come from Lean 4.36.0 on FloatLib, run on 2026-11-21 on an Intel Xeon Platinum 8275CL (96 threads, shared with other jobs).

Alt text: Three panels with logarithmic axes and one blue line each, rising one for one with the size: from 2 to 100 fused multiply-adds, from 4 to 128 pairs and from 7 to 1,023 additions. In the first and third panels the circles on the line sit inside the NumFuzz squares at every size that has one, inside Gappa diamonds at the small sizes and under textbook plus signs at the large ones; open triangles at the top edge of the first panel mark FPTaylor's bounds, and one FPTaylor triangle stands far above the line at the small sum. In the middle panel the plus signs sit on the circles and the NumFuzz squares lie about a factor two above the line.

Notes: FloatLib: `roundoff closed theorem` proves a closed bound for the loop at every length (a `List.foldl` of fused multiply-adds, a `Fin.foldl` of products and additions, a `List.foldl` of additions, each operation the IEEE 754 operation of `Binary64` rounded toward plus infinity); the suite's corollaries, proved in Lean from that theorem, give the relative form with the weight (1+u)^n - 1 for n fused operations, n additions or n pairs, and Lean checks the decimal value of the weight at each benchmark size. For each of the 14 programs drawn Lean also checks by `rfl` that the loop at the benchmark's size is the straight-line program that FloatLib's FPBench pipeline makes of the artifact's file. `roundoff closed` does not follow a loop that starts from a computed value, so the dot product is proved as a loop from an input value and the corollary puts the first product in its place. Marks that coincide are drawn one inside the other. FloatLib's weight is NumFuzz's bound to the three digits the paper prints at 7 of 7 sizes of Horner's rule and 2 of 2 of the serial sum. For the dot product FloatLib's weight is the textbook bound n u at 4 of 4 sizes, and NumFuzz's bound (2n - 1) u is 1.75 to 1.99 times it. Beyond the axis (as relative errors): Horner's rule of size 2: 6.49e-11; Horner's rule of size 5: 0.162; Horner's rule of size 10: 1.14e+13; Horner's rule of size 20: 2.53e+43. NumFuzz, Gappa and FPTaylor analyze real inputs and rounded real operations without overflow; FloatLib's loop theorems are about the IEEE 754 operations on binary64 values and carry the condition that no step overflows. The numbers behind the marks, as relative errors:

| family | program | size | FloatLib | NumFuzz | textbook | Gappa | FPTaylor | loop = program |
| --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | --- |
| Horner's rule | Horner2 | 2 | 4.4409e-16 | 4.44e-16 | - | 4.44e-16 | 6.49e-11 | proved |
| Horner's rule | Horner5 | 5 | 1.1103e-15 | 1.11e-15 | - | 1.11e-15 | 1.62e-01 | proved |
| Horner's rule | Horner10 | 10 | 2.2205e-15 | 2.22e-15 | - | 2.22e-15 | 1.14e+13 | proved |
| Horner's rule | Horner20 | 20 | 4.4409e-15 | 4.44e-15 | - | 4.44e-15 | 2.53e+43 | proved |
| Horner's rule | large_benchmarks/Horner50 | 50 | 1.1103e-14 | 1.11e-14 | 1.11e-14 | - | - | proved |
| Horner's rule | large_benchmarks/Horner75 | 75 | 1.6654e-14 | 1.66e-14 | 1.66e-14 | - | - | proved |
| Horner's rule | large_benchmarks/Horner100 | 100 | 2.2205e-14 | 2.22e-14 | 2.22e-14 | - | - | proved |
| dot product | large_benchmarks/mat_mul_4 | 4 | 8.8818e-16 | 1.55e-15 | 8.88e-16 | - | - | proved |
| dot product | large_benchmarks/mat_mul_8 | 8 | 1.7764e-15 | - | - | - | - | proved |
| dot product | large_benchmarks/mat_mul_16 | 16 | 3.5528e-15 | 6.88e-15 | 3.55e-15 | - | - | proved |
| dot product | large_benchmarks/mat_mul_64 | 64 | 1.4211e-14 | 2.82e-14 | 1.42e-14 | - | - | proved |
| dot product | large_benchmarks/mat_mul_128 | 128 | 2.8422e-14 | 5.66e-14 | 2.84e-14 | - | - | proved |
| serial sum | test02_sum8 | 7 | 1.5544e-15 | 1.55e-15 | - | 1.55e-15 | 9.32e-14 | proved |
| serial sum | large_benchmarks/serial_sum | 1,023 | 2.2716e-13 | 2.27e-13 | 2.27e-13 | - | - | proved |

From Lean: FloatLib's theorems, the decimal weights and the `rfl` checks. From scripts: the proposal of each decimal weight (rounded up to five digits) and the transcription of the paper's Tables 3 and 4. Source: `results/programs.csv`.

Files: `02-sums-horner-dot.png`, `02-sums-horner-dot.svg`.
