Average Error: 0.0 → 0.0
Time: 689.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 r45109 = x;
        double r45110 = r45109 * r45109;
        double r45111 = 2.0;
        double r45112 = r45110 * r45111;
        double r45113 = 1.0;
        double r45114 = r45112 - r45113;
        return r45114;
}

double f(double x) {
        double r45115 = x;
        double r45116 = r45115 * r45115;
        double r45117 = 2.0;
        double r45118 = r45116 * r45117;
        double r45119 = 1.0;
        double r45120 = r45118 - r45119;
        return r45120;
}

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