Average Error: 29.5 → 0
Time: 6.5s
Precision: 64
\[\left(1 + x\right) - x\]
\[1\]
\left(1 + x\right) - x
1
double f(double x) {
        double r59641 = 1.0;
        double r59642 = x;
        double r59643 = r59641 + r59642;
        double r59644 = r59643 - r59642;
        return r59644;
}

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

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 29.5

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

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

    \[\leadsto 1\]

Reproduce

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