Average Error: 0.0 → 0.0
Time: 471.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 r56280 = x;
        double r56281 = r56280 * r56280;
        double r56282 = 2.0;
        double r56283 = r56281 * r56282;
        double r56284 = 1.0;
        double r56285 = r56283 - r56284;
        return r56285;
}

double f(double x) {
        double r56286 = x;
        double r56287 = r56286 * r56286;
        double r56288 = 2.0;
        double r56289 = r56287 * r56288;
        double r56290 = 1.0;
        double r56291 = r56289 - r56290;
        return r56291;
}

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