Average Error: 0.0 → 0.0
Time: 496.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 r34722 = x;
        double r34723 = r34722 * r34722;
        double r34724 = 2.0;
        double r34725 = r34723 * r34724;
        double r34726 = 1.0;
        double r34727 = r34725 - r34726;
        return r34727;
}

double f(double x) {
        double r34728 = x;
        double r34729 = r34728 * r34728;
        double r34730 = 2.0;
        double r34731 = r34729 * r34730;
        double r34732 = 1.0;
        double r34733 = r34731 - r34732;
        return r34733;
}

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