Average Error: 0.0 → 0.0
Time: 2.3s
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 r2483524 = x;
        double r2483525 = r2483524 * r2483524;
        double r2483526 = 2.0;
        double r2483527 = r2483525 * r2483526;
        double r2483528 = 1.0;
        double r2483529 = r2483527 - r2483528;
        return r2483529;
}

double f(double x) {
        double r2483530 = 2.0;
        double r2483531 = x;
        double r2483532 = r2483531 * r2483531;
        double r2483533 = r2483530 * r2483532;
        double r2483534 = 1.0;
        double r2483535 = r2483533 - r2483534;
        return r2483535;
}

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 
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  (- (* (* x x) 2.0) 1.0))