Average Error: 0.0 → 0.0
Time: 7.9s
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 r49837 = x;
        double r49838 = r49837 * r49837;
        double r49839 = 2.0;
        double r49840 = r49838 * r49839;
        double r49841 = 1.0;
        double r49842 = r49840 - r49841;
        return r49842;
}

double f(double x) {
        double r49843 = x;
        double r49844 = r49843 * r49843;
        double r49845 = 2.0;
        double r49846 = r49844 * r49845;
        double r49847 = 1.0;
        double r49848 = r49846 - r49847;
        return r49848;
}

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