Average Error: 0.0 → 0.0
Time: 882.0ms
Precision: 64
\[\left(x \cdot x\right) \cdot 2 - 1\]
\[\left(x \cdot x\right) \cdot 2 - 1\]
\left(x \cdot x\right) \cdot 2 - 1
\left(x \cdot x\right) \cdot 2 - 1
double f(double x) {
        double r3144773 = x;
        double r3144774 = r3144773 * r3144773;
        double r3144775 = 2.0;
        double r3144776 = r3144774 * r3144775;
        double r3144777 = 1.0;
        double r3144778 = r3144776 - r3144777;
        return r3144778;
}

double f(double x) {
        double r3144779 = x;
        double r3144780 = r3144779 * r3144779;
        double r3144781 = 2.0;
        double r3144782 = r3144780 * r3144781;
        double r3144783 = 1.0;
        double r3144784 = r3144782 - r3144783;
        return r3144784;
}

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