Average Error: 15.9 → 0.0
Time: 10.0s
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 r383084 = x;
        double r383085 = 1.0;
        double r383086 = r383085 - r383084;
        double r383087 = y;
        double r383088 = r383085 - r383087;
        double r383089 = r383086 * r383088;
        double r383090 = r383084 + r383089;
        return r383090;
}

double f(double x, double y) {
        double r383091 = y;
        double r383092 = x;
        double r383093 = 1.0;
        double r383094 = r383092 - r383093;
        double r383095 = r383091 * r383094;
        double r383096 = r383095 + r383093;
        return r383096;
}

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

Derivation

  1. Initial program 15.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. Taylor expanded around 0 0.0

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

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

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

Reproduce

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