Average Error: 16.9 → 0.0
Time: 1.0s
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 r666428 = x;
        double r666429 = 1.0;
        double r666430 = r666429 - r666428;
        double r666431 = y;
        double r666432 = r666429 - r666431;
        double r666433 = r666430 * r666432;
        double r666434 = r666428 + r666433;
        return r666434;
}

double f(double x, double y) {
        double r666435 = x;
        double r666436 = y;
        double r666437 = r666435 * r666436;
        double r666438 = 1.0;
        double r666439 = r666437 + r666438;
        double r666440 = r666438 * r666436;
        double r666441 = r666439 - r666440;
        return r666441;
}

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

Derivation

  1. Initial program 16.9

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