Average Error: 0.0 → 0.0
Time: 702.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 r37535 = x;
        double r37536 = r37535 * r37535;
        double r37537 = 2.0;
        double r37538 = r37536 * r37537;
        double r37539 = 1.0;
        double r37540 = r37538 - r37539;
        return r37540;
}

double f(double x) {
        double r37541 = x;
        double r37542 = r37541 * r37541;
        double r37543 = 2.0;
        double r37544 = r37542 * r37543;
        double r37545 = 1.0;
        double r37546 = r37544 - r37545;
        return r37546;
}

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