Average Error: 0.0 → 0.0
Time: 773.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 r56621 = x;
        double r56622 = r56621 * r56621;
        double r56623 = 2.0;
        double r56624 = r56622 * r56623;
        double r56625 = 1.0;
        double r56626 = r56624 - r56625;
        return r56626;
}

double f(double x) {
        double r56627 = x;
        double r56628 = r56627 * r56627;
        double r56629 = 2.0;
        double r56630 = r56628 * r56629;
        double r56631 = 1.0;
        double r56632 = r56630 - r56631;
        return r56632;
}

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