Average Error: 29.6 → 0
Time: 1.1s
Precision: 64
\[\left(x + 1\right) - x\]
\[1\]
\left(x + 1\right) - x
1
double f(double x) {
        double r1307972 = x;
        double r1307973 = 1.0;
        double r1307974 = r1307972 + r1307973;
        double r1307975 = r1307974 - r1307972;
        return r1307975;
}

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

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(x + 1\right) - x\]
  2. Simplified0

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

    \[\leadsto 1\]

Reproduce

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