Average Error: 0.0 → 0.0
Time: 1.3s
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 r21466 = x;
        double r21467 = r21466 * r21466;
        double r21468 = 2.0;
        double r21469 = r21467 * r21468;
        double r21470 = 1.0;
        double r21471 = r21469 - r21470;
        return r21471;
}

double f(double x) {
        double r21472 = x;
        double r21473 = r21472 * r21472;
        double r21474 = 2.0;
        double r21475 = r21473 * r21474;
        double r21476 = 1.0;
        double r21477 = r21475 - r21476;
        return r21477;
}

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