Average Error: 17.0 → 0.0
Time: 1.1s
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 r570789 = x;
        double r570790 = 1.0;
        double r570791 = r570790 - r570789;
        double r570792 = y;
        double r570793 = r570790 - r570792;
        double r570794 = r570791 * r570793;
        double r570795 = r570789 + r570794;
        return r570795;
}

double f(double x, double y) {
        double r570796 = x;
        double r570797 = y;
        double r570798 = r570796 * r570797;
        double r570799 = 1.0;
        double r570800 = r570798 + r570799;
        double r570801 = r570799 * r570797;
        double r570802 = r570800 - r570801;
        return r570802;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

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

Derivation

  1. Initial program 17.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 2019353 
(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))))