Average Error: 0.0 → 0.0
Time: 464.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 r38250 = x;
        double r38251 = r38250 * r38250;
        double r38252 = 2.0;
        double r38253 = r38251 * r38252;
        double r38254 = 1.0;
        double r38255 = r38253 - r38254;
        return r38255;
}

double f(double x) {
        double r38256 = x;
        double r38257 = r38256 * r38256;
        double r38258 = 2.0;
        double r38259 = r38257 * r38258;
        double r38260 = 1.0;
        double r38261 = r38259 - r38260;
        return r38261;
}

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