Average Error: 16.3 → 0.0
Time: 8.5s
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 r1031447 = x;
        double r1031448 = 1.0;
        double r1031449 = r1031448 - r1031447;
        double r1031450 = y;
        double r1031451 = r1031448 - r1031450;
        double r1031452 = r1031449 * r1031451;
        double r1031453 = r1031447 + r1031452;
        return r1031453;
}

double f(double x, double y) {
        double r1031454 = x;
        double r1031455 = y;
        double r1031456 = r1031454 * r1031455;
        double r1031457 = 1.0;
        double r1031458 = r1031456 + r1031457;
        double r1031459 = r1031457 * r1031455;
        double r1031460 = r1031458 - r1031459;
        return r1031460;
}

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