Average Error: 5.7 → 0.1
Time: 1.5m
Precision: 64
Internal Precision: 384
\[\frac{\left(1.0 - x\right) \cdot \left(3.0 - x\right)}{y \cdot 3.0}\]
\[\frac{1.0 - x}{y} \cdot \frac{3.0 - x}{3.0}\]

Error

Bits error versus x

Bits error versus y

Target

Original5.7
Target0.1
Herbie0.1
\[\frac{1.0 - x}{y} \cdot \frac{3.0 - x}{3.0}\]

Derivation

  1. Initial program 5.7

    \[\frac{\left(1.0 - x\right) \cdot \left(3.0 - x\right)}{y \cdot 3.0}\]
  2. Using strategy rm
  3. Applied times-frac0.1

    \[\leadsto \color{blue}{\frac{1.0 - x}{y} \cdot \frac{3.0 - x}{3.0}}\]
  4. Removed slow pow expressions.

Runtime

Time bar (total: 1.5m)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit +o reduce:binary-search
(FPCore (x y)
  :name "Diagrams.TwoD.Arc:bezierFromSweepQ1 from diagrams-lib-1.3.0.3"

  :herbie-target
  (* (/ (- 1.0 x) y) (/ (- 3.0 x) 3.0))

  (/ (* (- 1.0 x) (- 3.0 x)) (* y 3.0)))