Average Error: 0.0 → 0.0
Time: 1.6s
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 r54357 = x;
        double r54358 = r54357 * r54357;
        double r54359 = 2.0;
        double r54360 = r54358 * r54359;
        double r54361 = 1.0;
        double r54362 = r54360 - r54361;
        return r54362;
}

double f(double x) {
        double r54363 = x;
        double r54364 = r54363 * r54363;
        double r54365 = 2.0;
        double r54366 = r54364 * r54365;
        double r54367 = 1.0;
        double r54368 = r54366 - r54367;
        return r54368;
}

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