Average Error: 0.0 → 0.0
Time: 1.4s
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 r32454 = x;
        double r32455 = r32454 * r32454;
        double r32456 = 2.0;
        double r32457 = r32455 * r32456;
        double r32458 = 1.0;
        double r32459 = r32457 - r32458;
        return r32459;
}

double f(double x) {
        double r32460 = x;
        double r32461 = r32460 * r32460;
        double r32462 = 2.0;
        double r32463 = r32461 * r32462;
        double r32464 = 1.0;
        double r32465 = r32463 - r32464;
        return r32465;
}

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