Average Error: 0.0 → 0.0
Time: 487.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 r53729 = x;
        double r53730 = r53729 * r53729;
        double r53731 = 2.0;
        double r53732 = r53730 * r53731;
        double r53733 = 1.0;
        double r53734 = r53732 - r53733;
        return r53734;
}

double f(double x) {
        double r53735 = x;
        double r53736 = r53735 * r53735;
        double r53737 = 2.0;
        double r53738 = r53736 * r53737;
        double r53739 = 1.0;
        double r53740 = r53738 - r53739;
        return r53740;
}

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