Average Error: 0.0 → 0.0
Time: 487.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 r29055 = x;
        double r29056 = r29055 * r29055;
        double r29057 = 2.0;
        double r29058 = r29056 * r29057;
        double r29059 = 1.0;
        double r29060 = r29058 - r29059;
        return r29060;
}

double f(double x) {
        double r29061 = x;
        double r29062 = r29061 * r29061;
        double r29063 = 2.0;
        double r29064 = r29062 * r29063;
        double r29065 = 1.0;
        double r29066 = r29064 - r29065;
        return r29066;
}

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