Average Error: 15.9 → 0.0
Time: 8.3s
Precision: 64
Internal precision: 128
\[x + \left(1.0 - x\right) \cdot \left(1.0 - y\right)\]
\[\left(x - 1.0\right) \cdot y + 1.0\]

Error

Bits error versus x

Bits error versus y

Target

Original15.9
Comparison0.0
Herbie0.0
\[ y \cdot x - \left(y - 1.0\right) \]

Derivation

  1. Initial program 15.9

    \[x + \left(1.0 - x\right) \cdot \left(1.0 - y\right)\]
  2. Applied taylor 0.0

    \[\leadsto \left(1.0 + y \cdot x\right) - 1.0 \cdot y\]
  3. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{\left(1.0 + y \cdot x\right) - 1.0 \cdot y}\]
  4. Applied simplify 0.0

    \[\leadsto \color{blue}{\left(x - 1.0\right) \cdot y + 1.0}\]
  5. Removed slow pow expressions

Runtime

Time bar (total: 8.3s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(1483203668 3390019164 858052218 3192619183 2402579877 1861825898)'
(FPCore (x y)
  :name "Graphics.Rendering.Chart.Plot.Vectors:renderPlotVectors from Chart-1.5.3"

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

  (+ x (* (- 1.0 x) (- 1.0 y))))