Average Error: 0.0 → 0.0
Time: 3.6s
Precision: 64
\[\left(x \cdot x\right) \cdot 2.0 - 1.0\]
\[2.0 \cdot \left(x \cdot x\right) - 1.0\]
\left(x \cdot x\right) \cdot 2.0 - 1.0
2.0 \cdot \left(x \cdot x\right) - 1.0
double f(double x) {
        double r2423467 = x;
        double r2423468 = r2423467 * r2423467;
        double r2423469 = 2.0;
        double r2423470 = r2423468 * r2423469;
        double r2423471 = 1.0;
        double r2423472 = r2423470 - r2423471;
        return r2423472;
}

double f(double x) {
        double r2423473 = 2.0;
        double r2423474 = x;
        double r2423475 = r2423474 * r2423474;
        double r2423476 = r2423473 * r2423475;
        double r2423477 = 1.0;
        double r2423478 = r2423476 - r2423477;
        return r2423478;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(x \cdot x\right) \cdot 2.0 - 1.0\]
  2. Final simplification0.0

    \[\leadsto 2.0 \cdot \left(x \cdot x\right) - 1.0\]

Reproduce

herbie shell --seed 2019164 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  (- (* (* x x) 2.0) 1.0))