Average Error: 0.0 → 0.0
Time: 4.9s
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 r1830324 = x;
        double r1830325 = r1830324 * r1830324;
        double r1830326 = 2.0;
        double r1830327 = r1830325 * r1830326;
        double r1830328 = 1.0;
        double r1830329 = r1830327 - r1830328;
        return r1830329;
}

double f(double x) {
        double r1830330 = 2.0;
        double r1830331 = x;
        double r1830332 = r1830331 * r1830331;
        double r1830333 = r1830330 * r1830332;
        double r1830334 = 1.0;
        double r1830335 = r1830333 - r1830334;
        return r1830335;
}

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