Average Error: 0.0 → 0.0
Time: 504.0ms
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 r63875 = x;
        double r63876 = r63875 * r63875;
        double r63877 = 2.0;
        double r63878 = r63876 * r63877;
        double r63879 = 1.0;
        double r63880 = r63878 - r63879;
        return r63880;
}

double f(double x) {
        double r63881 = x;
        double r63882 = r63881 * r63881;
        double r63883 = 2.0;
        double r63884 = r63882 * r63883;
        double r63885 = 1.0;
        double r63886 = r63884 - r63885;
        return r63886;
}

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