Average Error: 16.7 → 0.0
Time: 1.4s
Precision: 64
\[x + \left(1 - x\right) \cdot \left(1 - y\right)\]
\[\left(x \cdot y + 1\right) - 1 \cdot y\]
x + \left(1 - x\right) \cdot \left(1 - y\right)
\left(x \cdot y + 1\right) - 1 \cdot y
double f(double x, double y) {
        double r593808 = x;
        double r593809 = 1.0;
        double r593810 = r593809 - r593808;
        double r593811 = y;
        double r593812 = r593809 - r593811;
        double r593813 = r593810 * r593812;
        double r593814 = r593808 + r593813;
        return r593814;
}

double f(double x, double y) {
        double r593815 = x;
        double r593816 = y;
        double r593817 = r593815 * r593816;
        double r593818 = 1.0;
        double r593819 = r593817 + r593818;
        double r593820 = r593818 * r593816;
        double r593821 = r593819 - r593820;
        return r593821;
}

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

Derivation

  1. Initial program 16.7

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

Reproduce

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