Average Error: 0.0 → 0.0
Time: 1.2s
Precision: 64
\[\left(x \cdot x\right) \cdot 2 - 1\]
\[2 \cdot \left(x \cdot x\right) - 1\]
\left(x \cdot x\right) \cdot 2 - 1
2 \cdot \left(x \cdot x\right) - 1
double f(double x) {
        double r2168420 = x;
        double r2168421 = r2168420 * r2168420;
        double r2168422 = 2.0;
        double r2168423 = r2168421 * r2168422;
        double r2168424 = 1.0;
        double r2168425 = r2168423 - r2168424;
        return r2168425;
}

double f(double x) {
        double r2168426 = 2.0;
        double r2168427 = x;
        double r2168428 = r2168427 * r2168427;
        double r2168429 = r2168426 * r2168428;
        double r2168430 = 1.0;
        double r2168431 = r2168429 - r2168430;
        return r2168431;
}

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 2 \cdot \left(x \cdot x\right) - 1\]

Reproduce

herbie shell --seed 2019174 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  (- (* (* x x) 2.0) 1.0))