Average Error: 0.0 → 0.0
Time: 2.2s
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 r2986629 = x;
        double r2986630 = r2986629 * r2986629;
        double r2986631 = 2.0;
        double r2986632 = r2986630 * r2986631;
        double r2986633 = 1.0;
        double r2986634 = r2986632 - r2986633;
        return r2986634;
}

double f(double x) {
        double r2986635 = 2.0;
        double r2986636 = x;
        double r2986637 = r2986636 * r2986636;
        double r2986638 = r2986635 * r2986637;
        double r2986639 = 1.0;
        double r2986640 = r2986638 - r2986639;
        return r2986640;
}

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