Average Error: 0.0 → 0.0
Time: 8.4s
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 r50909 = x;
        double r50910 = r50909 * r50909;
        double r50911 = 2.0;
        double r50912 = r50910 * r50911;
        double r50913 = 1.0;
        double r50914 = r50912 - r50913;
        return r50914;
}

double f(double x) {
        double r50915 = x;
        double r50916 = r50915 * r50915;
        double r50917 = 2.0;
        double r50918 = r50916 * r50917;
        double r50919 = 1.0;
        double r50920 = r50918 - r50919;
        return r50920;
}

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