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 r197683 = 1.0;
        double r197684 = x;
        double r197685 = r197683 - r197684;
        double r197686 = y;
        double r197687 = r197685 - r197686;
        return r197687;
}

double f(double x, double y) {
        double r197688 = 1.0;
        double r197689 = x;
        double r197690 = y;
        double r197691 = r197689 + r197690;
        double r197692 = r197688 - r197691;
        return r197692;
}

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 
(FPCore (x y)
  :name "Data.Colour.CIE.Chromaticity:chromaCoords from colour-2.3.3"
  :precision binary64
  (- (- 1 x) y))