Average Error: 0.0 → 0.0
Time: 5.2s
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 r40950 = x;
        double r40951 = r40950 * r40950;
        double r40952 = 2.0;
        double r40953 = r40951 * r40952;
        double r40954 = 1.0;
        double r40955 = r40953 - r40954;
        return r40955;
}

double f(double x) {
        double r40956 = x;
        double r40957 = r40956 * r40956;
        double r40958 = 2.0;
        double r40959 = r40957 * r40958;
        double r40960 = 1.0;
        double r40961 = r40959 - r40960;
        return r40961;
}

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