Average Error: 0.0 → 0.0
Time: 695.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 r49758 = x;
        double r49759 = r49758 * r49758;
        double r49760 = 2.0;
        double r49761 = r49759 * r49760;
        double r49762 = 1.0;
        double r49763 = r49761 - r49762;
        return r49763;
}

double f(double x) {
        double r49764 = x;
        double r49765 = r49764 * r49764;
        double r49766 = 2.0;
        double r49767 = r49765 * r49766;
        double r49768 = 1.0;
        double r49769 = r49767 - r49768;
        return r49769;
}

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