Average Error: 16.2 → 0.0
Time: 12.3s
Precision: 64
\[x + \left(1.0 - x\right) \cdot \left(1.0 - y\right)\]
\[1.0 + \left(x - 1.0\right) \cdot y\]
x + \left(1.0 - x\right) \cdot \left(1.0 - y\right)
1.0 + \left(x - 1.0\right) \cdot y
double f(double x, double y) {
        double r30425189 = x;
        double r30425190 = 1.0;
        double r30425191 = r30425190 - r30425189;
        double r30425192 = y;
        double r30425193 = r30425190 - r30425192;
        double r30425194 = r30425191 * r30425193;
        double r30425195 = r30425189 + r30425194;
        return r30425195;
}

double f(double x, double y) {
        double r30425196 = 1.0;
        double r30425197 = x;
        double r30425198 = r30425197 - r30425196;
        double r30425199 = y;
        double r30425200 = r30425198 * r30425199;
        double r30425201 = r30425196 + r30425200;
        return r30425201;
}

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

Derivation

  1. Initial program 16.2

    \[x + \left(1.0 - x\right) \cdot \left(1.0 - y\right)\]
  2. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{\left(1.0 + x \cdot y\right) - 1.0 \cdot y}\]
  3. Simplified0.0

    \[\leadsto \color{blue}{y \cdot \left(x - 1.0\right) + 1.0}\]
  4. Final simplification0.0

    \[\leadsto 1.0 + \left(x - 1.0\right) \cdot y\]

Reproduce

herbie shell --seed 2019162 
(FPCore (x y)
  :name "Graphics.Rendering.Chart.Plot.Vectors:renderPlotVectors from Chart-1.5.3"

  :herbie-target
  (- (* y x) (- y 1.0))

  (+ x (* (- 1.0 x) (- 1.0 y))))