Average Error: 5.4 → 0.1
Time: 26.5s
Precision: 64
Internal precision: 128
\[\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.4
Comparison0.1
Herbie0.1
\[ \frac{1.0 - x}{y} \cdot \frac{3.0 - x}{3.0} \]

Derivation

  1. Initial program 5.4

    \[\frac{\left(1.0 - x\right) \cdot \left(3.0 - x\right)}{y \cdot 3.0}\]
  2. Using strategy rm
  3. Applied times-frac 0.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: 26.5s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(2077726301 398460641 2697410058 752837548 1556095798 2470385496)'
(FPCore (x y)
  :name "Diagrams.TwoD.Arc:bezierFromSweepQ1 from diagrams-lib-1.3.0.3"

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

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