Average Error: 16.8 → 0.0
Time: 1.6s
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 r755064 = x;
        double r755065 = 1.0;
        double r755066 = r755065 - r755064;
        double r755067 = y;
        double r755068 = r755065 - r755067;
        double r755069 = r755066 * r755068;
        double r755070 = r755064 + r755069;
        return r755070;
}

double f(double x, double y) {
        double r755071 = y;
        double r755072 = x;
        double r755073 = 1.0;
        double r755074 = r755072 - r755073;
        double r755075 = r755071 * r755074;
        double r755076 = r755075 + r755073;
        return r755076;
}

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. Taylor expanded around 0 0.0

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

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

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

Reproduce

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