Average Error: 0.0 → 0.0
Time: 1.7s
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 r18776 = x;
        double r18777 = r18776 * r18776;
        double r18778 = 2.0;
        double r18779 = r18777 * r18778;
        double r18780 = 1.0;
        double r18781 = r18779 - r18780;
        return r18781;
}

double f(double x) {
        double r18782 = x;
        double r18783 = r18782 * r18782;
        double r18784 = 2.0;
        double r18785 = r18783 * r18784;
        double r18786 = 1.0;
        double r18787 = r18785 - r18786;
        return r18787;
}

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 2019198 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  (- (* (* x x) 2.0) 1.0))