Average Error: 0.0 → 0.0
Time: 1.2s
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 r32884 = x;
        double r32885 = r32884 * r32884;
        double r32886 = 2.0;
        double r32887 = r32885 * r32886;
        double r32888 = 1.0;
        double r32889 = r32887 - r32888;
        return r32889;
}

double f(double x) {
        double r32890 = x;
        double r32891 = r32890 * r32890;
        double r32892 = 2.0;
        double r32893 = r32891 * r32892;
        double r32894 = 1.0;
        double r32895 = r32893 - r32894;
        return r32895;
}

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