Average Error: 0.0 → 0.0
Time: 910.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 r33805 = x;
        double r33806 = r33805 * r33805;
        double r33807 = 2.0;
        double r33808 = r33806 * r33807;
        double r33809 = 1.0;
        double r33810 = r33808 - r33809;
        return r33810;
}

double f(double x) {
        double r33811 = x;
        double r33812 = r33811 * r33811;
        double r33813 = 2.0;
        double r33814 = r33812 * r33813;
        double r33815 = 1.0;
        double r33816 = r33814 - r33815;
        return r33816;
}

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