Average Error: 16.7 → 0.0
Time: 21.2s
Precision: 64
\[x + \left(1 - x\right) \cdot \left(1 - y\right)\]
\[y \cdot \left(x - 1\right) + 1\]
x + \left(1 - x\right) \cdot \left(1 - y\right)
y \cdot \left(x - 1\right) + 1
double f(double x, double y) {
        double r743129 = x;
        double r743130 = 1.0;
        double r743131 = r743130 - r743129;
        double r743132 = y;
        double r743133 = r743130 - r743132;
        double r743134 = r743131 * r743133;
        double r743135 = r743129 + r743134;
        return r743135;
}

double f(double x, double y) {
        double r743136 = y;
        double r743137 = x;
        double r743138 = 1.0;
        double r743139 = r743137 - r743138;
        double r743140 = r743136 * r743139;
        double r743141 = r743140 + r743138;
        return r743141;
}

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

Derivation

  1. Initial program 16.7

    \[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}{y \cdot \left(x - 1\right) + 1}\]
  4. Final simplification0.0

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

Reproduce

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