Average Error: 0.0 → 0.0
Time: 562.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 r60120 = x;
        double r60121 = r60120 * r60120;
        double r60122 = 2.0;
        double r60123 = r60121 * r60122;
        double r60124 = 1.0;
        double r60125 = r60123 - r60124;
        return r60125;
}

double f(double x) {
        double r60126 = x;
        double r60127 = r60126 * r60126;
        double r60128 = 2.0;
        double r60129 = r60127 * r60128;
        double r60130 = 1.0;
        double r60131 = r60129 - r60130;
        return r60131;
}

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