Average Error: 29.7 → 0
Time: 1.4s
Precision: 64
\[\left(1 + x\right) - x\]
\[1\]
\left(1 + x\right) - x
1
double f(double x) {
        double r8019 = 1.0;
        double r8020 = x;
        double r8021 = r8019 + r8020;
        double r8022 = r8021 - r8020;
        return r8022;
}

double f(double __attribute__((unused)) x) {
        double r8023 = 1.0;
        return r8023;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 29.7

    \[\left(1 + x\right) - x\]
  2. Simplified0

    \[\leadsto \color{blue}{1}\]
  3. Final simplification0

    \[\leadsto 1\]

Reproduce

herbie shell --seed 2019200 
(FPCore (x)
  :name "Cancel like terms"
  (- (+ 1.0 x) x))