Average Error: 29.5 → 0
Time: 549.0ms
Precision: binary64
\[x - \left(x - 1\right)\]
\[1\]
x - \left(x - 1\right)
1
double code(double x) {
	return ((double) (x - ((double) (x - 1.0))));
}
double code(double x) {
	return 1.0;
}

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

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

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

    \[\leadsto 1\]

Reproduce

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