Average Error: 0.0 → 0.0
Time: 470.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 r58799 = x;
        double r58800 = r58799 * r58799;
        double r58801 = 2.0;
        double r58802 = r58800 * r58801;
        double r58803 = 1.0;
        double r58804 = r58802 - r58803;
        return r58804;
}

double f(double x) {
        double r58805 = x;
        double r58806 = r58805 * r58805;
        double r58807 = 2.0;
        double r58808 = r58806 * r58807;
        double r58809 = 1.0;
        double r58810 = r58808 - r58809;
        return r58810;
}

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