Average Error: 0.0 → 0.0
Time: 495.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 r52511 = x;
        double r52512 = r52511 * r52511;
        double r52513 = 2.0;
        double r52514 = r52512 * r52513;
        double r52515 = 1.0;
        double r52516 = r52514 - r52515;
        return r52516;
}

double f(double x) {
        double r52517 = x;
        double r52518 = r52517 * r52517;
        double r52519 = 2.0;
        double r52520 = r52518 * r52519;
        double r52521 = 1.0;
        double r52522 = r52520 - r52521;
        return r52522;
}

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