Average Error: 0.0 → 0.0
Time: 659.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 r52053 = x;
        double r52054 = r52053 * r52053;
        double r52055 = 2.0;
        double r52056 = r52054 * r52055;
        double r52057 = 1.0;
        double r52058 = r52056 - r52057;
        return r52058;
}

double f(double x) {
        double r52059 = x;
        double r52060 = r52059 * r52059;
        double r52061 = 2.0;
        double r52062 = r52060 * r52061;
        double r52063 = 1.0;
        double r52064 = r52062 - r52063;
        return r52064;
}

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