Average Error: 15.6 → 0.0
Time: 7.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 r482573 = x;
        double r482574 = 1.0;
        double r482575 = r482574 - r482573;
        double r482576 = y;
        double r482577 = r482574 - r482576;
        double r482578 = r482575 * r482577;
        double r482579 = r482573 + r482578;
        return r482579;
}

double f(double x, double y) {
        double r482580 = 1.0;
        double r482581 = y;
        double r482582 = x;
        double r482583 = r482582 - r482580;
        double r482584 = r482581 * r482583;
        double r482585 = r482580 + r482584;
        return r482585;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original15.6
Target0.0
Herbie0.0
\[y \cdot x - \left(y - 1\right)\]

Derivation

  1. Initial program 15.6

    \[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. Taylor expanded around 0 0.0

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

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

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

Reproduce

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