Average Error: 0.0 → 0.0
Time: 525.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 r38609 = x;
        double r38610 = r38609 * r38609;
        double r38611 = 2.0;
        double r38612 = r38610 * r38611;
        double r38613 = 1.0;
        double r38614 = r38612 - r38613;
        return r38614;
}

double f(double x) {
        double r38615 = x;
        double r38616 = r38615 * r38615;
        double r38617 = 2.0;
        double r38618 = r38616 * r38617;
        double r38619 = 1.0;
        double r38620 = r38618 - r38619;
        return r38620;
}

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