Average Error: 0.0 → 0.0
Time: 550.0ms
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 r30890 = x;
        double r30891 = r30890 * r30890;
        double r30892 = 2.0;
        double r30893 = r30891 * r30892;
        double r30894 = 1.0;
        double r30895 = r30893 - r30894;
        return r30895;
}

double f(double x) {
        double r30896 = x;
        double r30897 = r30896 * r30896;
        double r30898 = 2.0;
        double r30899 = r30897 * r30898;
        double r30900 = 1.0;
        double r30901 = r30899 - r30900;
        return r30901;
}

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 2020021 
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  :precision binary64
  (- (* (* x x) 2) 1))