Average Error: 0.0 → 0.0
Time: 4.1s
Precision: 64
\[\left(1 - x\right) + \left(1 - y\right)\]
\[2 - \left(x + y\right)\]
\left(1 - x\right) + \left(1 - y\right)
2 - \left(x + y\right)
double f(double x, double y) {
        double r558252 = 1.0;
        double r558253 = x;
        double r558254 = r558252 - r558253;
        double r558255 = y;
        double r558256 = r558252 - r558255;
        double r558257 = r558254 + r558256;
        return r558257;
}

double f(double x, double y) {
        double r558258 = 2.0;
        double r558259 = x;
        double r558260 = y;
        double r558261 = r558259 + r558260;
        double r558262 = r558258 - r558261;
        return r558262;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(1 - x\right) + \left(1 - y\right)\]
  2. Taylor expanded around 0 0.0

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

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

Reproduce

herbie shell --seed 1 
(FPCore (x y)
  :name "(1 - x) + (1 - y) "
  :precision binary64
  (+ (- 1 x) (- 1 y)))