Average Error: 29.6 → 0
Time: 1.1s
Precision: 64
\[\left(1 + x\right) - x\]
\[1\]
\left(1 + x\right) - x
1
double f(double x) {
        double r3557775 = 1.0;
        double r3557776 = x;
        double r3557777 = r3557775 + r3557776;
        double r3557778 = r3557777 - r3557776;
        return r3557778;
}

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

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 1 
(FPCore (x)
  :name "(1 + x) - x"
  :precision binary64
  (- (+ 1 x) x))