Average Error: 0.0 → 0.0
Time: 5.1s
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 r2301028 = x;
        double r2301029 = r2301028 * r2301028;
        double r2301030 = 2.0;
        double r2301031 = r2301029 * r2301030;
        double r2301032 = 1.0;
        double r2301033 = r2301031 - r2301032;
        return r2301033;
}

double f(double x) {
        double r2301034 = 2.0;
        double r2301035 = x;
        double r2301036 = r2301035 * r2301035;
        double r2301037 = r2301034 * r2301036;
        double r2301038 = 1.0;
        double r2301039 = r2301037 - r2301038;
        return r2301039;
}

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