Average Error: 16.6 → 0.0
Time: 846.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 r635322 = x;
        double r635323 = 1.0;
        double r635324 = r635323 - r635322;
        double r635325 = y;
        double r635326 = r635323 - r635325;
        double r635327 = r635324 * r635326;
        double r635328 = r635322 + r635327;
        return r635328;
}

double f(double x, double y) {
        double r635329 = x;
        double r635330 = y;
        double r635331 = r635329 * r635330;
        double r635332 = 1.0;
        double r635333 = r635331 + r635332;
        double r635334 = r635332 * r635330;
        double r635335 = r635333 - r635334;
        return r635335;
}

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

Derivation

  1. Initial program 16.6

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