Average Error: 0.0 → 0.0
Time: 1.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 r706640 = x;
        double r706641 = r706640 * r706640;
        double r706642 = 2.0;
        double r706643 = r706641 * r706642;
        double r706644 = 1.0;
        double r706645 = r706643 - r706644;
        return r706645;
}

double f(double x) {
        double r706646 = 2.0;
        double r706647 = x;
        double r706648 = r706647 * r706647;
        double r706649 = r706646 * r706648;
        double r706650 = 1.0;
        double r706651 = r706649 - r706650;
        return r706651;
}

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