Average Error: 0.0 → 0.0
Time: 1.0s
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 r48257 = x;
        double r48258 = r48257 * r48257;
        double r48259 = 2.0;
        double r48260 = r48258 * r48259;
        double r48261 = 1.0;
        double r48262 = r48260 - r48261;
        return r48262;
}

double f(double x) {
        double r48263 = x;
        double r48264 = r48263 * r48263;
        double r48265 = 2.0;
        double r48266 = r48264 * r48265;
        double r48267 = 1.0;
        double r48268 = r48266 - r48267;
        return r48268;
}

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