Average Error: 0.0 → 0.0
Time: 1.4s
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 r36522 = x;
        double r36523 = r36522 * r36522;
        double r36524 = 2.0;
        double r36525 = r36523 * r36524;
        double r36526 = 1.0;
        double r36527 = r36525 - r36526;
        return r36527;
}

double f(double x) {
        double r36528 = x;
        double r36529 = r36528 * r36528;
        double r36530 = 2.0;
        double r36531 = r36529 * r36530;
        double r36532 = 1.0;
        double r36533 = r36531 - r36532;
        return r36533;
}

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