Average Error: 0.0 → 0.0
Time: 477.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 r25763 = x;
        double r25764 = r25763 * r25763;
        double r25765 = 2.0;
        double r25766 = r25764 * r25765;
        double r25767 = 1.0;
        double r25768 = r25766 - r25767;
        return r25768;
}

double f(double x) {
        double r25769 = x;
        double r25770 = r25769 * r25769;
        double r25771 = 2.0;
        double r25772 = r25770 * r25771;
        double r25773 = 1.0;
        double r25774 = r25772 - r25773;
        return r25774;
}

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