Average Error: 0.0 → 0.0
Time: 703.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 r38729 = x;
        double r38730 = r38729 * r38729;
        double r38731 = 2.0;
        double r38732 = r38730 * r38731;
        double r38733 = 1.0;
        double r38734 = r38732 - r38733;
        return r38734;
}

double f(double x) {
        double r38735 = x;
        double r38736 = r38735 * r38735;
        double r38737 = 2.0;
        double r38738 = r38736 * r38737;
        double r38739 = 1.0;
        double r38740 = r38738 - r38739;
        return r38740;
}

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