Average Error: 16.7 → 0.0
Time: 20.3s
Precision: 64
\[x + \left(1 - x\right) \cdot \left(1 - y\right)\]
\[y \cdot x + \left(1 - 1 \cdot y\right)\]
x + \left(1 - x\right) \cdot \left(1 - y\right)
y \cdot x + \left(1 - 1 \cdot y\right)
double f(double x, double y) {
        double r708079 = x;
        double r708080 = 1.0;
        double r708081 = r708080 - r708079;
        double r708082 = y;
        double r708083 = r708080 - r708082;
        double r708084 = r708081 * r708083;
        double r708085 = r708079 + r708084;
        return r708085;
}

double f(double x, double y) {
        double r708086 = y;
        double r708087 = x;
        double r708088 = r708086 * r708087;
        double r708089 = 1.0;
        double r708090 = r708089 * r708086;
        double r708091 = r708089 - r708090;
        double r708092 = r708088 + r708091;
        return r708092;
}

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

Derivation

  1. Initial program 16.7

    \[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. Simplified0.0

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

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

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

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

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

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

Reproduce

herbie shell --seed 2020042 
(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))))