Average Error: 0.0 → 0.0
Time: 8.1s
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 r53494 = x;
        double r53495 = r53494 * r53494;
        double r53496 = 2.0;
        double r53497 = r53495 * r53496;
        double r53498 = 1.0;
        double r53499 = r53497 - r53498;
        return r53499;
}

double f(double x) {
        double r53500 = x;
        double r53501 = r53500 * r53500;
        double r53502 = 2.0;
        double r53503 = r53501 * r53502;
        double r53504 = 1.0;
        double r53505 = r53503 - r53504;
        return r53505;
}

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