Average Error: 0.0 → 0.0
Time: 381.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 r56580 = x;
        double r56581 = r56580 * r56580;
        double r56582 = 2.0;
        double r56583 = r56581 * r56582;
        double r56584 = 1.0;
        double r56585 = r56583 - r56584;
        return r56585;
}

double f(double x) {
        double r56586 = x;
        double r56587 = r56586 * r56586;
        double r56588 = 2.0;
        double r56589 = r56587 * r56588;
        double r56590 = 1.0;
        double r56591 = r56589 - r56590;
        return r56591;
}

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