Average Error: 0.0 → 0.0
Time: 509.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 r26990 = x;
        double r26991 = r26990 * r26990;
        double r26992 = 2.0;
        double r26993 = r26991 * r26992;
        double r26994 = 1.0;
        double r26995 = r26993 - r26994;
        return r26995;
}

double f(double x) {
        double r26996 = x;
        double r26997 = r26996 * r26996;
        double r26998 = 2.0;
        double r26999 = r26997 * r26998;
        double r27000 = 1.0;
        double r27001 = r26999 - r27000;
        return r27001;
}

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