Average Error: 15.8 → 0.0
Time: 1.2s
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 r570261 = x;
        double r570262 = 1.0;
        double r570263 = r570262 - r570261;
        double r570264 = y;
        double r570265 = r570262 - r570264;
        double r570266 = r570263 * r570265;
        double r570267 = r570261 + r570266;
        return r570267;
}

double f(double x, double y) {
        double r570268 = x;
        double r570269 = y;
        double r570270 = r570268 * r570269;
        double r570271 = 1.0;
        double r570272 = r570270 + r570271;
        double r570273 = r570271 * r570269;
        double r570274 = r570272 - r570273;
        return r570274;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

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

Derivation

  1. Initial program 15.8

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