Average Error: 0.0 → 0.0
Time: 383.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 r30222 = x;
        double r30223 = r30222 * r30222;
        double r30224 = 2.0;
        double r30225 = r30223 * r30224;
        double r30226 = 1.0;
        double r30227 = r30225 - r30226;
        return r30227;
}

double f(double x) {
        double r30228 = x;
        double r30229 = r30228 * r30228;
        double r30230 = 2.0;
        double r30231 = r30229 * r30230;
        double r30232 = 1.0;
        double r30233 = r30231 - r30232;
        return r30233;
}

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