Average Error: 0.0 → 0.0
Time: 5.7s
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 r2825857 = x;
        double r2825858 = r2825857 * r2825857;
        double r2825859 = 2.0;
        double r2825860 = r2825858 * r2825859;
        double r2825861 = 1.0;
        double r2825862 = r2825860 - r2825861;
        return r2825862;
}

double f(double x) {
        double r2825863 = 2.0;
        double r2825864 = x;
        double r2825865 = r2825864 * r2825864;
        double r2825866 = r2825863 * r2825865;
        double r2825867 = 1.0;
        double r2825868 = r2825866 - r2825867;
        return r2825868;
}

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