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 r30059 = x;
        double r30060 = r30059 * r30059;
        double r30061 = 2.0;
        double r30062 = r30060 * r30061;
        double r30063 = 1.0;
        double r30064 = r30062 - r30063;
        return r30064;
}

double f(double x) {
        double r30065 = x;
        double r30066 = r30065 * r30065;
        double r30067 = 2.0;
        double r30068 = r30066 * r30067;
        double r30069 = 1.0;
        double r30070 = r30068 - r30069;
        return r30070;
}

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