Average Error: 0.0 → 0.0
Time: 3.7s
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 r60164 = x;
        double r60165 = r60164 * r60164;
        double r60166 = 2.0;
        double r60167 = r60165 * r60166;
        double r60168 = 1.0;
        double r60169 = r60167 - r60168;
        return r60169;
}

double f(double x) {
        double r60170 = x;
        double r60171 = r60170 * r60170;
        double r60172 = 2.0;
        double r60173 = r60171 * r60172;
        double r60174 = 1.0;
        double r60175 = r60173 - r60174;
        return r60175;
}

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