Average Error: 0.0 → 0.0
Time: 824.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 r53148 = x;
        double r53149 = r53148 * r53148;
        double r53150 = 2.0;
        double r53151 = r53149 * r53150;
        double r53152 = 1.0;
        double r53153 = r53151 - r53152;
        return r53153;
}

double f(double x) {
        double r53154 = x;
        double r53155 = r53154 * r53154;
        double r53156 = 2.0;
        double r53157 = r53155 * r53156;
        double r53158 = 1.0;
        double r53159 = r53157 - r53158;
        return r53159;
}

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