Average Error: 0.0 → 0.0
Time: 4.2s
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 r84392 = x;
        double r84393 = r84392 * r84392;
        double r84394 = 2.0;
        double r84395 = r84393 * r84394;
        double r84396 = 1.0;
        double r84397 = r84395 - r84396;
        return r84397;
}

double f(double x) {
        double r84398 = x;
        double r84399 = r84398 * r84398;
        double r84400 = 2.0;
        double r84401 = r84399 * r84400;
        double r84402 = 1.0;
        double r84403 = r84401 - r84402;
        return r84403;
}

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