Average Error: 0.0 → 0.0
Time: 1.8s
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 r45267 = x;
        double r45268 = r45267 * r45267;
        double r45269 = 2.0;
        double r45270 = r45268 * r45269;
        double r45271 = 1.0;
        double r45272 = r45270 - r45271;
        return r45272;
}

double f(double x) {
        double r45273 = x;
        double r45274 = r45273 * r45273;
        double r45275 = 2.0;
        double r45276 = r45274 * r45275;
        double r45277 = 1.0;
        double r45278 = r45276 - r45277;
        return r45278;
}

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