Average Error: 0.0 → 0.0
Time: 596.0ms
Precision: 64
\[\left(1 - x\right) - y\]
\[1 + \left(\left(-x\right) - y\right)\]
\left(1 - x\right) - y
1 + \left(\left(-x\right) - y\right)
double f(double x, double y) {
        double r251373 = 1.0;
        double r251374 = x;
        double r251375 = r251373 - r251374;
        double r251376 = y;
        double r251377 = r251375 - r251376;
        return r251377;
}

double f(double x, double y) {
        double r251378 = 1.0;
        double r251379 = x;
        double r251380 = -r251379;
        double r251381 = y;
        double r251382 = r251380 - r251381;
        double r251383 = r251378 + r251382;
        return r251383;
}

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 sub-neg0.0

    \[\leadsto \color{blue}{\left(1 + \left(-x\right)\right)} - y\]
  4. Applied associate--l+0.0

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

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

Reproduce

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