Average Error: 0.0 → 0.0
Time: 476.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 r50539 = x;
        double r50540 = r50539 * r50539;
        double r50541 = 2.0;
        double r50542 = r50540 * r50541;
        double r50543 = 1.0;
        double r50544 = r50542 - r50543;
        return r50544;
}

double f(double x) {
        double r50545 = x;
        double r50546 = r50545 * r50545;
        double r50547 = 2.0;
        double r50548 = r50546 * r50547;
        double r50549 = 1.0;
        double r50550 = r50548 - r50549;
        return r50550;
}

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