Average Error: 17.1 → 0.0
Time: 7.9s
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 r421806 = x;
        double r421807 = 1.0;
        double r421808 = r421807 - r421806;
        double r421809 = y;
        double r421810 = r421807 - r421809;
        double r421811 = r421808 * r421810;
        double r421812 = r421806 + r421811;
        return r421812;
}

double f(double x, double y) {
        double r421813 = x;
        double r421814 = y;
        double r421815 = r421813 * r421814;
        double r421816 = 1.0;
        double r421817 = r421815 + r421816;
        double r421818 = r421816 * r421814;
        double r421819 = r421817 - r421818;
        return r421819;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

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

Derivation

  1. Initial program 17.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 2019212 
(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))))