Average Error: 0.0 → 0.0
Time: 518.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 r48106 = x;
        double r48107 = r48106 * r48106;
        double r48108 = 2.0;
        double r48109 = r48107 * r48108;
        double r48110 = 1.0;
        double r48111 = r48109 - r48110;
        return r48111;
}

double f(double x) {
        double r48112 = x;
        double r48113 = r48112 * r48112;
        double r48114 = 2.0;
        double r48115 = r48113 * r48114;
        double r48116 = 1.0;
        double r48117 = r48115 - r48116;
        return r48117;
}

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