Average Error: 0.0 → 0.0
Time: 2.8s
Precision: 64
\[\left(1 - x\right) - y\]
\[1 - \left(x + y\right)\]
\left(1 - x\right) - y
1 - \left(x + y\right)
double f(double x, double y) {
        double r152249 = 1.0;
        double r152250 = x;
        double r152251 = r152249 - r152250;
        double r152252 = y;
        double r152253 = r152251 - r152252;
        return r152253;
}

double f(double x, double y) {
        double r152254 = 1.0;
        double r152255 = x;
        double r152256 = y;
        double r152257 = r152255 + r152256;
        double r152258 = r152254 - r152257;
        return r152258;
}

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) - y\]
  2. Using strategy rm
  3. Applied associate--l-0.0

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

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

Reproduce

herbie shell --seed 2019304 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.CIE.Chromaticity:chromaCoords from colour-2.3.3"
  :precision binary64
  (- (- 1 x) y))