Average Error: 0.0 → 0.0
Time: 477.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 r54623 = x;
        double r54624 = r54623 * r54623;
        double r54625 = 2.0;
        double r54626 = r54624 * r54625;
        double r54627 = 1.0;
        double r54628 = r54626 - r54627;
        return r54628;
}

double f(double x) {
        double r54629 = x;
        double r54630 = r54629 * r54629;
        double r54631 = 2.0;
        double r54632 = r54630 * r54631;
        double r54633 = 1.0;
        double r54634 = r54632 - r54633;
        return r54634;
}

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