Average Error: 0.0 → 0.0
Time: 6.1s
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 r41023 = x;
        double r41024 = r41023 * r41023;
        double r41025 = 2.0;
        double r41026 = r41024 * r41025;
        double r41027 = 1.0;
        double r41028 = r41026 - r41027;
        return r41028;
}

double f(double x) {
        double r41029 = x;
        double r41030 = r41029 * r41029;
        double r41031 = 2.0;
        double r41032 = r41030 * r41031;
        double r41033 = 1.0;
        double r41034 = r41032 - r41033;
        return r41034;
}

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