Average Error: 0.0 → 0.0
Time: 4.1s
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 r9867018 = 1.0;
        double r9867019 = x;
        double r9867020 = r9867018 - r9867019;
        double r9867021 = y;
        double r9867022 = r9867020 - r9867021;
        return r9867022;
}

double f(double x, double y) {
        double r9867023 = 1.0;
        double r9867024 = x;
        double r9867025 = y;
        double r9867026 = r9867024 + r9867025;
        double r9867027 = r9867023 - r9867026;
        return r9867027;
}

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 2019171 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.CIE.Chromaticity:chromaCoords from colour-2.3.3"
  (- (- 1.0 x) y))