Average Error: 0.0 → 0.0
Time: 783.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 r3142883 = x;
        double r3142884 = r3142883 * r3142883;
        double r3142885 = 2.0;
        double r3142886 = r3142884 * r3142885;
        double r3142887 = 1.0;
        double r3142888 = r3142886 - r3142887;
        return r3142888;
}

double f(double x) {
        double r3142889 = x;
        double r3142890 = r3142889 * r3142889;
        double r3142891 = 2.0;
        double r3142892 = r3142890 * r3142891;
        double r3142893 = 1.0;
        double r3142894 = r3142892 - r3142893;
        return r3142894;
}

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