Average Error: 0.0 → 0.0
Time: 405.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 r62159 = x;
        double r62160 = r62159 * r62159;
        double r62161 = 2.0;
        double r62162 = r62160 * r62161;
        double r62163 = 1.0;
        double r62164 = r62162 - r62163;
        return r62164;
}

double f(double x) {
        double r62165 = x;
        double r62166 = r62165 * r62165;
        double r62167 = 2.0;
        double r62168 = r62166 * r62167;
        double r62169 = 1.0;
        double r62170 = r62168 - r62169;
        return r62170;
}

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