Average Error: 16.1 → 0.0
Time: 1.7s
Precision: 64
\[x + \left(1 - x\right) \cdot \left(1 - y\right)\]
\[\left(x \cdot y + 1\right) - 1 \cdot y\]
x + \left(1 - x\right) \cdot \left(1 - y\right)
\left(x \cdot y + 1\right) - 1 \cdot y
double f(double x, double y) {
        double r661834 = x;
        double r661835 = 1.0;
        double r661836 = r661835 - r661834;
        double r661837 = y;
        double r661838 = r661835 - r661837;
        double r661839 = r661836 * r661838;
        double r661840 = r661834 + r661839;
        return r661840;
}

double f(double x, double y) {
        double r661841 = x;
        double r661842 = y;
        double r661843 = r661841 * r661842;
        double r661844 = 1.0;
        double r661845 = r661843 + r661844;
        double r661846 = r661844 * r661842;
        double r661847 = r661845 - r661846;
        return r661847;
}

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

Derivation

  1. Initial program 16.1

    \[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. Final simplification0.0

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

Reproduce

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