Average Error: 16.2 → 0.0
Time: 11.2s
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 r28615326 = x;
        double r28615327 = 1.0;
        double r28615328 = r28615327 - r28615326;
        double r28615329 = y;
        double r28615330 = r28615327 - r28615329;
        double r28615331 = r28615328 * r28615330;
        double r28615332 = r28615326 + r28615331;
        return r28615332;
}

double f(double x, double y) {
        double r28615333 = 1.0;
        double r28615334 = x;
        double r28615335 = r28615334 - r28615333;
        double r28615336 = y;
        double r28615337 = r28615335 * r28615336;
        double r28615338 = r28615333 + r28615337;
        return r28615338;
}

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