Average Error: 29.3 → 0
Time: 754.0ms
Precision: 64
\[\left(1 + x\right) - x\]
\[1\]
\left(1 + x\right) - x
1
double f(double x) {
        double r8077 = 1.0;
        double r8078 = x;
        double r8079 = r8077 + r8078;
        double r8080 = r8079 - r8078;
        return r8080;
}

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

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 29.3

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

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

    \[\leadsto 1\]

Reproduce

herbie shell --seed 2019107 +o rules:numerics
(FPCore (x)
  :name "Cancel like terms"
  (- (+ 1 x) x))