Average Error: 0.0 → 0.0
Time: 3.6s
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 r54775 = x;
        double r54776 = r54775 * r54775;
        double r54777 = 2.0;
        double r54778 = r54776 * r54777;
        double r54779 = 1.0;
        double r54780 = r54778 - r54779;
        return r54780;
}

double f(double x) {
        double r54781 = x;
        double r54782 = r54781 * r54781;
        double r54783 = 2.0;
        double r54784 = r54782 * r54783;
        double r54785 = 1.0;
        double r54786 = r54784 - r54785;
        return r54786;
}

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