Average Error: 16.4 → 0.0
Time: 11.2s
Precision: 64
Internal Precision: 1408
\[x + \left(1.0 - x\right) \cdot \left(1.0 - y\right)\]
\[1.0 - y \cdot \left(1.0 - x\right)\]

Error

Bits error versus x

Bits error versus y

Target

Original16.4
Target0.0
Herbie0.0
\[y \cdot x - \left(y - 1.0\right)\]

Derivation

  1. Initial program 16.4

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

    \[\leadsto \color{blue}{\left(1.0 + y \cdot x\right) - 1.0 \cdot y}\]
  3. Applied simplify0.0

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

Runtime

Time bar (total: 11.2s)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit
(FPCore (x y)
  :name "Graphics.Rendering.Chart.Plot.Vectors:renderPlotVectors from Chart-1.5.3"

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

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