Average Error: 0.0 → 0.0
Time: 359.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 r52007 = x;
        double r52008 = r52007 * r52007;
        double r52009 = 2.0;
        double r52010 = r52008 * r52009;
        double r52011 = 1.0;
        double r52012 = r52010 - r52011;
        return r52012;
}

double f(double x) {
        double r52013 = x;
        double r52014 = r52013 * r52013;
        double r52015 = 2.0;
        double r52016 = r52014 * r52015;
        double r52017 = 1.0;
        double r52018 = r52016 - r52017;
        return r52018;
}

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