Average Error: 16.5 → 0.0
Time: 5.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 r368547 = x;
        double r368548 = 1.0;
        double r368549 = r368548 - r368547;
        double r368550 = y;
        double r368551 = r368548 - r368550;
        double r368552 = r368549 * r368551;
        double r368553 = r368547 + r368552;
        return r368553;
}

double f(double x, double y) {
        double r368554 = x;
        double r368555 = y;
        double r368556 = r368554 * r368555;
        double r368557 = 1.0;
        double r368558 = r368556 + r368557;
        double r368559 = r368557 * r368555;
        double r368560 = r368558 - r368559;
        return r368560;
}

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