Average Error: 16.3 → 0.0
Time: 11.5s
Precision: 64
\[x + \left(1 - x\right) \cdot \left(1 - y\right)\]
\[\left(x \cdot y + 1\right) - 1 \cdot y\]
x + \left(1 - x\right) \cdot \left(1 - y\right)
\left(x \cdot y + 1\right) - 1 \cdot y
double f(double x, double y) {
        double r411332 = x;
        double r411333 = 1.0;
        double r411334 = r411333 - r411332;
        double r411335 = y;
        double r411336 = r411333 - r411335;
        double r411337 = r411334 * r411336;
        double r411338 = r411332 + r411337;
        return r411338;
}

double f(double x, double y) {
        double r411339 = x;
        double r411340 = y;
        double r411341 = r411339 * r411340;
        double r411342 = 1.0;
        double r411343 = r411341 + r411342;
        double r411344 = r411342 * r411340;
        double r411345 = r411343 - r411344;
        return r411345;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

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

Derivation

  1. Initial program 16.3

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

    \[\leadsto \color{blue}{\left(x \cdot y + 1\right) - 1 \cdot y}\]
  3. Final simplification0.0

    \[\leadsto \left(x \cdot y + 1\right) - 1 \cdot y\]

Reproduce

herbie shell --seed 2019199 
(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))))