Average Error: 0.0 → 0.0
Time: 1.6s
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 r32917 = x;
        double r32918 = r32917 * r32917;
        double r32919 = 2.0;
        double r32920 = r32918 * r32919;
        double r32921 = 1.0;
        double r32922 = r32920 - r32921;
        return r32922;
}

double f(double x) {
        double r32923 = x;
        double r32924 = r32923 * r32923;
        double r32925 = 2.0;
        double r32926 = r32924 * r32925;
        double r32927 = 1.0;
        double r32928 = r32926 - r32927;
        return r32928;
}

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