Average Error: 16.1 → 0.0
Time: 11.0s
Precision: 64
\[x + \left(1.0 - x\right) \cdot \left(1.0 - y\right)\]
\[1.0 + \left(x - 1.0\right) \cdot y\]
x + \left(1.0 - x\right) \cdot \left(1.0 - y\right)
1.0 + \left(x - 1.0\right) \cdot y
double f(double x, double y) {
        double r31899216 = x;
        double r31899217 = 1.0;
        double r31899218 = r31899217 - r31899216;
        double r31899219 = y;
        double r31899220 = r31899217 - r31899219;
        double r31899221 = r31899218 * r31899220;
        double r31899222 = r31899216 + r31899221;
        return r31899222;
}

double f(double x, double y) {
        double r31899223 = 1.0;
        double r31899224 = x;
        double r31899225 = r31899224 - r31899223;
        double r31899226 = y;
        double r31899227 = r31899225 * r31899226;
        double r31899228 = r31899223 + r31899227;
        return r31899228;
}

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

Derivation

  1. Initial program 16.1

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

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

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

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

Reproduce

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