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 r47353 = x;
        double r47354 = r47353 * r47353;
        double r47355 = 2.0;
        double r47356 = r47354 * r47355;
        double r47357 = 1.0;
        double r47358 = r47356 - r47357;
        return r47358;
}

double f(double x) {
        double r47359 = x;
        double r47360 = r47359 * r47359;
        double r47361 = 2.0;
        double r47362 = r47360 * r47361;
        double r47363 = 1.0;
        double r47364 = r47362 - r47363;
        return r47364;
}

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