Average Error: 16.7 → 0.0
Time: 5.8s
Precision: 64
\[x + \left(1 - x\right) \cdot \left(1 - y\right)\]
\[1 + \left(x - 1\right) \cdot y\]
x + \left(1 - x\right) \cdot \left(1 - y\right)
1 + \left(x - 1\right) \cdot y
double f(double x, double y) {
        double r515501 = x;
        double r515502 = 1.0;
        double r515503 = r515502 - r515501;
        double r515504 = y;
        double r515505 = r515502 - r515504;
        double r515506 = r515503 * r515505;
        double r515507 = r515501 + r515506;
        return r515507;
}

double f(double x, double y) {
        double r515508 = 1.0;
        double r515509 = x;
        double r515510 = r515509 - r515508;
        double r515511 = y;
        double r515512 = r515510 * r515511;
        double r515513 = r515508 + r515512;
        return r515513;
}

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(1 + x \cdot y\right) - 1 \cdot y}\]
  3. Simplified0.0

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

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

Reproduce

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