Average Error: 16.3 → 0.0
Time: 888.0ms
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 r572650 = x;
        double r572651 = 1.0;
        double r572652 = r572651 - r572650;
        double r572653 = y;
        double r572654 = r572651 - r572653;
        double r572655 = r572652 * r572654;
        double r572656 = r572650 + r572655;
        return r572656;
}

double f(double x, double y) {
        double r572657 = x;
        double r572658 = y;
        double r572659 = r572657 * r572658;
        double r572660 = 1.0;
        double r572661 = r572659 + r572660;
        double r572662 = r572660 * r572658;
        double r572663 = r572661 - r572662;
        return r572663;
}

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

Derivation

  1. Initial program 16.3

    \[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 2020001 
(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))))