Average Error: 28.9 → 0
Time: 1.3s
Precision: 64
\[\left(1 + x\right) - 1\]
\[x\]
\left(1 + x\right) - 1
x
double f(double x) {
        double r54136096 = 1.0;
        double r54136097 = x;
        double r54136098 = r54136096 + r54136097;
        double r54136099 = r54136098 - r54136096;
        return r54136099;
}

double f(double x) {
        double r54136100 = x;
        return r54136100;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 28.9

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

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

    \[\leadsto x\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "(1 + x) - 1"
  (- (+ 1 x) 1))