Average Error: 0.0 → 0.0
Time: 472.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 r45036 = x;
        double r45037 = r45036 * r45036;
        double r45038 = 2.0;
        double r45039 = r45037 * r45038;
        double r45040 = 1.0;
        double r45041 = r45039 - r45040;
        return r45041;
}

double f(double x) {
        double r45042 = x;
        double r45043 = r45042 * r45042;
        double r45044 = 2.0;
        double r45045 = r45043 * r45044;
        double r45046 = 1.0;
        double r45047 = r45045 - r45046;
        return r45047;
}

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 2020046 
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  :precision binary64
  (- (* (* x x) 2) 1))