Average Error: 0.0 → 0.0
Time: 1.7s
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 r41006 = x;
        double r41007 = r41006 * r41006;
        double r41008 = 2.0;
        double r41009 = r41007 * r41008;
        double r41010 = 1.0;
        double r41011 = r41009 - r41010;
        return r41011;
}

double f(double x) {
        double r41012 = x;
        double r41013 = r41012 * r41012;
        double r41014 = 2.0;
        double r41015 = r41013 * r41014;
        double r41016 = 1.0;
        double r41017 = r41015 - r41016;
        return r41017;
}

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))