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 r837430 = x;
        double r837431 = 1.0;
        double r837432 = r837431 - r837430;
        double r837433 = y;
        double r837434 = r837431 - r837433;
        double r837435 = r837432 * r837434;
        double r837436 = r837430 + r837435;
        return r837436;
}

double f(double x, double y) {
        double r837437 = x;
        double r837438 = y;
        double r837439 = r837437 * r837438;
        double r837440 = 1.0;
        double r837441 = r837439 + r837440;
        double r837442 = r837440 * r837438;
        double r837443 = r837441 - r837442;
        return r837443;
}

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))))