Average Error: 16.3 → 0.0
Time: 830.0ms
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 r668238 = x;
        double r668239 = 1.0;
        double r668240 = r668239 - r668238;
        double r668241 = y;
        double r668242 = r668239 - r668241;
        double r668243 = r668240 * r668242;
        double r668244 = r668238 + r668243;
        return r668244;
}

double f(double x, double y) {
        double r668245 = x;
        double r668246 = y;
        double r668247 = r668245 * r668246;
        double r668248 = 1.0;
        double r668249 = r668247 + r668248;
        double r668250 = r668248 * r668246;
        double r668251 = r668249 - r668250;
        return r668251;
}

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 2020060 
(FPCore (x y)
  :name "Graphics.Rendering.Chart.Plot.Vectors:renderPlotVectors from Chart-1.5.3"
  :precision binary64

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

  (+ x (* (- 1 x) (- 1 y))))