Average Error: 29.8 → 0
Time: 870.0ms
Precision: 64
\[\left(1 + x\right) - x\]
\[1\]
\left(1 + x\right) - x
1
double f(double x) {
        double r8152 = 1.0;
        double r8153 = x;
        double r8154 = r8152 + r8153;
        double r8155 = r8154 - r8153;
        return r8155;
}

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

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 29.8

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

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

    \[\leadsto 1\]

Reproduce

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