Average Error: 0.0 → 0.0
Time: 8.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 r47427 = x;
        double r47428 = r47427 * r47427;
        double r47429 = 2.0;
        double r47430 = r47428 * r47429;
        double r47431 = 1.0;
        double r47432 = r47430 - r47431;
        return r47432;
}

double f(double x) {
        double r47433 = x;
        double r47434 = r47433 * r47433;
        double r47435 = 2.0;
        double r47436 = r47434 * r47435;
        double r47437 = 1.0;
        double r47438 = r47436 - r47437;
        return r47438;
}

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))