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 r1863456 = x;
        double r1863457 = r1863456 * r1863456;
        double r1863458 = 2.0;
        double r1863459 = r1863457 * r1863458;
        double r1863460 = 1.0;
        double r1863461 = r1863459 - r1863460;
        return r1863461;
}

double f(double x) {
        double r1863462 = 2.0;
        double r1863463 = x;
        double r1863464 = r1863463 * r1863463;
        double r1863465 = r1863462 * r1863464;
        double r1863466 = 1.0;
        double r1863467 = r1863465 - r1863466;
        return r1863467;
}

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