Average Error: 0.0 → 0.0
Time: 2.6s
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 r2407128 = x;
        double r2407129 = r2407128 * r2407128;
        double r2407130 = 2.0;
        double r2407131 = r2407129 * r2407130;
        double r2407132 = 1.0;
        double r2407133 = r2407131 - r2407132;
        return r2407133;
}

double f(double x) {
        double r2407134 = 2.0;
        double r2407135 = x;
        double r2407136 = r2407135 * r2407135;
        double r2407137 = r2407134 * r2407136;
        double r2407138 = 1.0;
        double r2407139 = r2407137 - r2407138;
        return r2407139;
}

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 2019158 
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  (- (* (* x x) 2.0) 1.0))