Average Error: 16.9 → 0.0
Time: 30.8s
Precision: 64
\[x + \left(1 - x\right) \cdot \left(1 - y\right)\]
\[1 + y \cdot \left(x - 1\right)\]
x + \left(1 - x\right) \cdot \left(1 - y\right)
1 + y \cdot \left(x - 1\right)
double f(double x, double y) {
        double r394331 = x;
        double r394332 = 1.0;
        double r394333 = r394332 - r394331;
        double r394334 = y;
        double r394335 = r394332 - r394334;
        double r394336 = r394333 * r394335;
        double r394337 = r394331 + r394336;
        return r394337;
}

double f(double x, double y) {
        double r394338 = 1.0;
        double r394339 = y;
        double r394340 = x;
        double r394341 = r394340 - r394338;
        double r394342 = r394339 * r394341;
        double r394343 = r394338 + r394342;
        return r394343;
}

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. Simplified0.0

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

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

Reproduce

herbie shell --seed 2019322 
(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))))