Average Error: 0.0 → 0.0
Time: 5.0s
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 r31399 = x;
        double r31400 = r31399 * r31399;
        double r31401 = 2.0;
        double r31402 = r31400 * r31401;
        double r31403 = 1.0;
        double r31404 = r31402 - r31403;
        return r31404;
}

double f(double x) {
        double r31405 = x;
        double r31406 = r31405 * r31405;
        double r31407 = 2.0;
        double r31408 = r31406 * r31407;
        double r31409 = 1.0;
        double r31410 = r31408 - r31409;
        return r31410;
}

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