Average Error: 17.0 → 0.0
Time: 9.4s
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 r28877431 = x;
        double r28877432 = 1.0;
        double r28877433 = r28877432 - r28877431;
        double r28877434 = y;
        double r28877435 = r28877432 - r28877434;
        double r28877436 = r28877433 * r28877435;
        double r28877437 = r28877431 + r28877436;
        return r28877437;
}

double f(double x, double y) {
        double r28877438 = 1.0;
        double r28877439 = x;
        double r28877440 = r28877439 - r28877438;
        double r28877441 = y;
        double r28877442 = r28877440 * r28877441;
        double r28877443 = r28877438 + r28877442;
        return r28877443;
}

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.0\right)\]

Derivation

  1. Initial program 17.0

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