Average Error: 16.3 → 0.0
Time: 1.1s
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 r594054 = x;
        double r594055 = 1.0;
        double r594056 = r594055 - r594054;
        double r594057 = y;
        double r594058 = r594055 - r594057;
        double r594059 = r594056 * r594058;
        double r594060 = r594054 + r594059;
        return r594060;
}

double f(double x, double y) {
        double r594061 = x;
        double r594062 = y;
        double r594063 = r594061 * r594062;
        double r594064 = 1.0;
        double r594065 = r594063 + r594064;
        double r594066 = r594064 * r594062;
        double r594067 = r594065 - r594066;
        return r594067;
}

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