Average Error: 0.0 → 0.0
Time: 2.3s
Precision: 64
\[\left(x \cdot x\right) \cdot 2.0 - 1.0\]
\[2.0 \cdot \left(x \cdot x\right) - 1.0\]
\left(x \cdot x\right) \cdot 2.0 - 1.0
2.0 \cdot \left(x \cdot x\right) - 1.0
double f(double x) {
        double r2333695 = x;
        double r2333696 = r2333695 * r2333695;
        double r2333697 = 2.0;
        double r2333698 = r2333696 * r2333697;
        double r2333699 = 1.0;
        double r2333700 = r2333698 - r2333699;
        return r2333700;
}

double f(double x) {
        double r2333701 = 2.0;
        double r2333702 = x;
        double r2333703 = r2333702 * r2333702;
        double r2333704 = r2333701 * r2333703;
        double r2333705 = 1.0;
        double r2333706 = r2333704 - r2333705;
        return r2333706;
}

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.0 - 1.0\]
  2. Final simplification0.0

    \[\leadsto 2.0 \cdot \left(x \cdot x\right) - 1.0\]

Reproduce

herbie shell --seed 2019168 
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  (- (* (* x x) 2.0) 1.0))