Average Error: 0.0 → 0.0
Time: 558.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 r57023 = x;
        double r57024 = r57023 * r57023;
        double r57025 = 2.0;
        double r57026 = r57024 * r57025;
        double r57027 = 1.0;
        double r57028 = r57026 - r57027;
        return r57028;
}

double f(double x) {
        double r57029 = x;
        double r57030 = r57029 * r57029;
        double r57031 = 2.0;
        double r57032 = r57030 * r57031;
        double r57033 = 1.0;
        double r57034 = r57032 - r57033;
        return r57034;
}

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