Average Error: 0.0 → 0.0
Time: 14.8s
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 r42139 = x;
        double r42140 = r42139 * r42139;
        double r42141 = 2.0;
        double r42142 = r42140 * r42141;
        double r42143 = 1.0;
        double r42144 = r42142 - r42143;
        return r42144;
}

double f(double x) {
        double r42145 = x;
        double r42146 = r42145 * r42145;
        double r42147 = 2.0;
        double r42148 = r42146 * r42147;
        double r42149 = 1.0;
        double r42150 = r42148 - r42149;
        return r42150;
}

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