Average Error: 16.5 → 0.0
Time: 12.6s
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 r362169 = x;
        double r362170 = 1.0;
        double r362171 = r362170 - r362169;
        double r362172 = y;
        double r362173 = r362170 - r362172;
        double r362174 = r362171 * r362173;
        double r362175 = r362169 + r362174;
        return r362175;
}

double f(double x, double y) {
        double r362176 = x;
        double r362177 = y;
        double r362178 = r362176 * r362177;
        double r362179 = 1.0;
        double r362180 = r362178 + r362179;
        double r362181 = r362179 * r362177;
        double r362182 = r362180 - r362181;
        return r362182;
}

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

Derivation

  1. Initial program 16.5

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