Average Error: 0.0 → 0.0
Time: 3.2s
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 r2069654 = x;
        double r2069655 = r2069654 * r2069654;
        double r2069656 = 2.0;
        double r2069657 = r2069655 * r2069656;
        double r2069658 = 1.0;
        double r2069659 = r2069657 - r2069658;
        return r2069659;
}

double f(double x) {
        double r2069660 = 2.0;
        double r2069661 = x;
        double r2069662 = r2069661 * r2069661;
        double r2069663 = r2069660 * r2069662;
        double r2069664 = 1.0;
        double r2069665 = r2069663 - r2069664;
        return r2069665;
}

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))