Average Error: 29.6 → 0
Time: 2.1s
Precision: 64
\[\left(1 + x\right) - x\]
\[1\]
\left(1 + x\right) - x
1
double f(double x) {
        double r8235 = 1.0;
        double r8236 = x;
        double r8237 = r8235 + r8236;
        double r8238 = r8237 - r8236;
        return r8238;
}

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

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 29.6

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

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

    \[\leadsto 1\]

Reproduce

herbie shell --seed 2019155 
(FPCore (x)
  :name "Cancel like terms"
  (- (+ 1 x) x))