Average Error: 0.0 → 0.0
Time: 4.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 r2069651 = x;
        double r2069652 = r2069651 * r2069651;
        double r2069653 = 2.0;
        double r2069654 = r2069652 * r2069653;
        double r2069655 = 1.0;
        double r2069656 = r2069654 - r2069655;
        return r2069656;
}

double f(double x) {
        double r2069657 = 2.0;
        double r2069658 = x;
        double r2069659 = r2069658 * r2069658;
        double r2069660 = r2069657 * r2069659;
        double r2069661 = 1.0;
        double r2069662 = r2069660 - r2069661;
        return r2069662;
}

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