Average Error: 0 → 0
Time: 768.0ms
Precision: 64
\[x \cdot 2 - 1\]
\[x \cdot 2 - 1\]
x \cdot 2 - 1
x \cdot 2 - 1
double f(double x) {
        double r3369443 = x;
        double r3369444 = 2.0;
        double r3369445 = r3369443 * r3369444;
        double r3369446 = 1.0;
        double r3369447 = r3369445 - r3369446;
        return r3369447;
}

double f(double x) {
        double r3369448 = x;
        double r3369449 = 2.0;
        double r3369450 = r3369448 * r3369449;
        double r3369451 = 1.0;
        double r3369452 = r3369450 - r3369451;
        return r3369452;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0

    \[x \cdot 2 - 1\]
  2. Final simplification0

    \[\leadsto x \cdot 2 - 1\]

Reproduce

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