Average Error: 0.0 → 0.0
Time: 6.5s
Precision: 64
\[\left(x \cdot x\right) \cdot 2 - 1\]
\[\left(x \cdot x\right) \cdot 2 - 1\]
\left(x \cdot x\right) \cdot 2 - 1
\left(x \cdot x\right) \cdot 2 - 1
double f(double x) {
        double r43863 = x;
        double r43864 = r43863 * r43863;
        double r43865 = 2.0;
        double r43866 = r43864 * r43865;
        double r43867 = 1.0;
        double r43868 = r43866 - r43867;
        return r43868;
}

double f(double x) {
        double r43869 = x;
        double r43870 = r43869 * r43869;
        double r43871 = 2.0;
        double r43872 = r43870 * r43871;
        double r43873 = 1.0;
        double r43874 = r43872 - r43873;
        return r43874;
}

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 - 1\]
  2. Final simplification0.0

    \[\leadsto \left(x \cdot x\right) \cdot 2 - 1\]

Reproduce

herbie shell --seed 2019325 
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  :precision binary64
  (- (* (* x x) 2) 1))