Average Error: 0 → 0
Time: 718.0ms
Precision: 64
\[2 \cdot x - 1\]
\[2 \cdot x - 1\]
2 \cdot x - 1
2 \cdot x - 1
double f(double x) {
        double r184320 = 2.0;
        double r184321 = x;
        double r184322 = r184320 * r184321;
        double r184323 = 1.0;
        double r184324 = r184322 - r184323;
        return r184324;
}

double f(double x) {
        double r184325 = 2.0;
        double r184326 = x;
        double r184327 = r184325 * r184326;
        double r184328 = 1.0;
        double r184329 = r184327 - r184328;
        return r184329;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0

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

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

Reproduce

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