Average Error: 0.0 → 0.0
Time: 597.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 r40357 = x;
        double r40358 = r40357 * r40357;
        double r40359 = 2.0;
        double r40360 = r40358 * r40359;
        double r40361 = 1.0;
        double r40362 = r40360 - r40361;
        return r40362;
}

double f(double x) {
        double r40363 = x;
        double r40364 = r40363 * r40363;
        double r40365 = 2.0;
        double r40366 = r40364 * r40365;
        double r40367 = 1.0;
        double r40368 = r40366 - r40367;
        return r40368;
}

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