Average Error: 0.0 → 0.0
Time: 4.7s
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 r34439 = x;
        double r34440 = r34439 * r34439;
        double r34441 = 2.0;
        double r34442 = r34440 * r34441;
        double r34443 = 1.0;
        double r34444 = r34442 - r34443;
        return r34444;
}

double f(double x) {
        double r34445 = x;
        double r34446 = r34445 * r34445;
        double r34447 = 2.0;
        double r34448 = r34446 * r34447;
        double r34449 = 1.0;
        double r34450 = r34448 - r34449;
        return r34450;
}

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