Average Error: 0.0 → 0.0
Time: 498.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 r41828 = x;
        double r41829 = r41828 * r41828;
        double r41830 = 2.0;
        double r41831 = r41829 * r41830;
        double r41832 = 1.0;
        double r41833 = r41831 - r41832;
        return r41833;
}

double f(double x) {
        double r41834 = x;
        double r41835 = r41834 * r41834;
        double r41836 = 2.0;
        double r41837 = r41835 * r41836;
        double r41838 = 1.0;
        double r41839 = r41837 - r41838;
        return r41839;
}

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