Average Error: 16.9 → 0.0
Time: 12.8s
Precision: 64
\[x + \left(1 - x\right) \cdot \left(1 - y\right)\]
\[y \cdot \left(x - 1\right) + 1\]
x + \left(1 - x\right) \cdot \left(1 - y\right)
y \cdot \left(x - 1\right) + 1
double f(double x, double y) {
        double r497900 = x;
        double r497901 = 1.0;
        double r497902 = r497901 - r497900;
        double r497903 = y;
        double r497904 = r497901 - r497903;
        double r497905 = r497902 * r497904;
        double r497906 = r497900 + r497905;
        return r497906;
}

double f(double x, double y) {
        double r497907 = y;
        double r497908 = x;
        double r497909 = 1.0;
        double r497910 = r497908 - r497909;
        double r497911 = r497907 * r497910;
        double r497912 = r497911 + r497909;
        return r497912;
}

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

Derivation

  1. Initial program 16.9

    \[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 y \cdot \left(x - 1\right) + 1\]

Reproduce

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