Average Error: 16.5 → 0.0
Time: 29.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 r464846 = x;
        double r464847 = 1.0;
        double r464848 = r464847 - r464846;
        double r464849 = y;
        double r464850 = r464847 - r464849;
        double r464851 = r464848 * r464850;
        double r464852 = r464846 + r464851;
        return r464852;
}

double f(double x, double y) {
        double r464853 = 1.0;
        double r464854 = y;
        double r464855 = x;
        double r464856 = r464854 * r464855;
        double r464857 = -r464853;
        double r464858 = r464854 * r464857;
        double r464859 = r464856 + r464858;
        double r464860 = r464853 + r464859;
        return r464860;
}

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

Derivation

  1. Initial program 16.5

    \[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 2019323 
(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))))