Average Error: 0.0 → 0.0
Time: 616.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 r30200 = x;
        double r30201 = r30200 * r30200;
        double r30202 = 2.0;
        double r30203 = r30201 * r30202;
        double r30204 = 1.0;
        double r30205 = r30203 - r30204;
        return r30205;
}

double f(double x) {
        double r30206 = x;
        double r30207 = r30206 * r30206;
        double r30208 = 2.0;
        double r30209 = r30207 * r30208;
        double r30210 = 1.0;
        double r30211 = r30209 - r30210;
        return r30211;
}

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