Average Error: 16.6 → 0.0
Time: 10.6s
Precision: 64
\[x + \left(1 - x\right) \cdot \left(1 - y\right)\]
\[\left(-1\right) \cdot y + \left(1 + y \cdot x\right)\]
x + \left(1 - x\right) \cdot \left(1 - y\right)
\left(-1\right) \cdot y + \left(1 + y \cdot x\right)
double f(double x, double y) {
        double r503489 = x;
        double r503490 = 1.0;
        double r503491 = r503490 - r503489;
        double r503492 = y;
        double r503493 = r503490 - r503492;
        double r503494 = r503491 * r503493;
        double r503495 = r503489 + r503494;
        return r503495;
}

double f(double x, double y) {
        double r503496 = 1.0;
        double r503497 = -r503496;
        double r503498 = y;
        double r503499 = r503497 * r503498;
        double r503500 = x;
        double r503501 = r503498 * r503500;
        double r503502 = r503496 + r503501;
        double r503503 = r503499 + r503502;
        return r503503;
}

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

Derivation

  1. Initial program 16.6

    \[x + \left(1 - x\right) \cdot \left(1 - y\right)\]
  2. Taylor expanded around 0 0.0

    \[\leadsto \color{blue}{\left(1 + x \cdot y\right) - 1 \cdot y}\]
  3. Simplified0.0

    \[\leadsto \color{blue}{1 + y \cdot \left(x - 1\right)}\]
  4. Using strategy rm
  5. Applied sub-neg0.0

    \[\leadsto 1 + y \cdot \color{blue}{\left(x + \left(-1\right)\right)}\]
  6. Applied distribute-rgt-in0.0

    \[\leadsto 1 + \color{blue}{\left(x \cdot y + \left(-1\right) \cdot y\right)}\]
  7. Applied associate-+r+0.0

    \[\leadsto \color{blue}{\left(1 + x \cdot y\right) + \left(-1\right) \cdot y}\]
  8. Simplified0.0

    \[\leadsto \color{blue}{\left(y \cdot x + 1\right)} + \left(-1\right) \cdot y\]
  9. Final simplification0.0

    \[\leadsto \left(-1\right) \cdot y + \left(1 + y \cdot x\right)\]

Reproduce

herbie shell --seed 2019196 
(FPCore (x y)
  :name "Graphics.Rendering.Chart.Plot.Vectors:renderPlotVectors from Chart-1.5.3"

  :herbie-target
  (- (* y x) (- y 1.0))

  (+ x (* (- 1.0 x) (- 1.0 y))))