Average Error: 0.0 → 0.0
Time: 506.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 r38636 = x;
        double r38637 = r38636 * r38636;
        double r38638 = 2.0;
        double r38639 = r38637 * r38638;
        double r38640 = 1.0;
        double r38641 = r38639 - r38640;
        return r38641;
}

double f(double x) {
        double r38642 = x;
        double r38643 = r38642 * r38642;
        double r38644 = 2.0;
        double r38645 = r38643 * r38644;
        double r38646 = 1.0;
        double r38647 = r38645 - r38646;
        return r38647;
}

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