Average Error: 0.0 → 0.0
Time: 541.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 r38861 = x;
        double r38862 = r38861 * r38861;
        double r38863 = 2.0;
        double r38864 = r38862 * r38863;
        double r38865 = 1.0;
        double r38866 = r38864 - r38865;
        return r38866;
}

double f(double x) {
        double r38867 = x;
        double r38868 = r38867 * r38867;
        double r38869 = 2.0;
        double r38870 = r38868 * r38869;
        double r38871 = 1.0;
        double r38872 = r38870 - r38871;
        return r38872;
}

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