Average Error: 0.0 → 0.0
Time: 2.1s
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 r2416358 = x;
        double r2416359 = r2416358 * r2416358;
        double r2416360 = 2.0;
        double r2416361 = r2416359 * r2416360;
        double r2416362 = 1.0;
        double r2416363 = r2416361 - r2416362;
        return r2416363;
}

double f(double x) {
        double r2416364 = 2.0;
        double r2416365 = x;
        double r2416366 = r2416365 * r2416365;
        double r2416367 = r2416364 * r2416366;
        double r2416368 = 1.0;
        double r2416369 = r2416367 - r2416368;
        return r2416369;
}

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))