Average Error: 16.8 → 0.0
Time: 2.0s
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 r440953 = x;
        double r440954 = 1.0;
        double r440955 = r440954 - r440953;
        double r440956 = y;
        double r440957 = r440954 - r440956;
        double r440958 = r440955 * r440957;
        double r440959 = r440953 + r440958;
        return r440959;
}

double f(double x, double y) {
        double r440960 = y;
        double r440961 = x;
        double r440962 = 1.0;
        double r440963 = r440961 - r440962;
        double r440964 = r440960 * r440963;
        double r440965 = r440964 + r440962;
        return r440965;
}

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

Derivation

  1. Initial program 16.8

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

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

Reproduce

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