Average Error: 0.0 → 0.0
Time: 1.6s
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 r68130 = x;
        double r68131 = r68130 * r68130;
        double r68132 = 2.0;
        double r68133 = r68131 * r68132;
        double r68134 = 1.0;
        double r68135 = r68133 - r68134;
        return r68135;
}

double f(double x) {
        double r68136 = x;
        double r68137 = r68136 * r68136;
        double r68138 = 2.0;
        double r68139 = r68137 * r68138;
        double r68140 = 1.0;
        double r68141 = r68139 - r68140;
        return r68141;
}

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))