Average Error: 16.1 → 0.0
Time: 876.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 r821618 = x;
        double r821619 = 1.0;
        double r821620 = r821619 - r821618;
        double r821621 = y;
        double r821622 = r821619 - r821621;
        double r821623 = r821620 * r821622;
        double r821624 = r821618 + r821623;
        return r821624;
}

double f(double x, double y) {
        double r821625 = x;
        double r821626 = y;
        double r821627 = r821625 * r821626;
        double r821628 = 1.0;
        double r821629 = r821627 + r821628;
        double r821630 = r821628 * r821626;
        double r821631 = r821629 - r821630;
        return r821631;
}

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 2020057 
(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))))