Average Error: 0.0 → 0.0
Time: 3.4s
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 r2015044 = x;
        double r2015045 = r2015044 * r2015044;
        double r2015046 = 2.0;
        double r2015047 = r2015045 * r2015046;
        double r2015048 = 1.0;
        double r2015049 = r2015047 - r2015048;
        return r2015049;
}

double f(double x) {
        double r2015050 = 2.0;
        double r2015051 = x;
        double r2015052 = r2015051 * r2015051;
        double r2015053 = r2015050 * r2015052;
        double r2015054 = 1.0;
        double r2015055 = r2015053 - r2015054;
        return r2015055;
}

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