Average Error: 16.0 → 0.0
Time: 1.4s
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 r704611 = x;
        double r704612 = 1.0;
        double r704613 = r704612 - r704611;
        double r704614 = y;
        double r704615 = r704612 - r704614;
        double r704616 = r704613 * r704615;
        double r704617 = r704611 + r704616;
        return r704617;
}

double f(double x, double y) {
        double r704618 = x;
        double r704619 = y;
        double r704620 = r704618 * r704619;
        double r704621 = 1.0;
        double r704622 = r704620 + r704621;
        double r704623 = r704621 * r704619;
        double r704624 = r704622 - r704623;
        return r704624;
}

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.0
Target0.0
Herbie0.0
\[y \cdot x - \left(y - 1\right)\]

Derivation

  1. Initial program 16.0

    \[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 2020089 
(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))))