Average Error: 0.0 → 0.0
Time: 3.2s
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 r5642359 = x;
        double r5642360 = r5642359 * r5642359;
        double r5642361 = 2.0;
        double r5642362 = r5642360 * r5642361;
        double r5642363 = 1.0;
        double r5642364 = r5642362 - r5642363;
        return r5642364;
}

double f(double x) {
        double r5642365 = x;
        double r5642366 = r5642365 * r5642365;
        double r5642367 = 2.0;
        double r5642368 = r5642366 * r5642367;
        double r5642369 = 1.0;
        double r5642370 = r5642368 - r5642369;
        return r5642370;
}

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 2019173 
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  (- (* (* x x) 2.0) 1.0))