Average Error: 16.1 → 0.0
Time: 31.7s
Precision: 64
\[x + \left(1 - x\right) \cdot \left(1 - y\right)\]
\[1 + \left(y \cdot x + y \cdot \left(-1\right)\right)\]
x + \left(1 - x\right) \cdot \left(1 - y\right)
1 + \left(y \cdot x + y \cdot \left(-1\right)\right)
double f(double x, double y) {
        double r414330 = x;
        double r414331 = 1.0;
        double r414332 = r414331 - r414330;
        double r414333 = y;
        double r414334 = r414331 - r414333;
        double r414335 = r414332 * r414334;
        double r414336 = r414330 + r414335;
        return r414336;
}

double f(double x, double y) {
        double r414337 = 1.0;
        double r414338 = y;
        double r414339 = x;
        double r414340 = r414338 * r414339;
        double r414341 = -r414337;
        double r414342 = r414338 * r414341;
        double r414343 = r414340 + r414342;
        double r414344 = r414337 + r414343;
        return r414344;
}

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\right)\]

Derivation

  1. Initial program 16.1

    \[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}{1 + y \cdot \left(x - 1\right)}\]
  4. Using strategy rm
  5. Applied sub-neg0.0

    \[\leadsto 1 + y \cdot \color{blue}{\left(x + \left(-1\right)\right)}\]
  6. Applied distribute-lft-in0.0

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

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

Reproduce

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