Average Error: 0.0 → 0.0
Time: 4.9s
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 r48848 = x;
        double r48849 = r48848 * r48848;
        double r48850 = 2.0;
        double r48851 = r48849 * r48850;
        double r48852 = 1.0;
        double r48853 = r48851 - r48852;
        return r48853;
}

double f(double x) {
        double r48854 = x;
        double r48855 = r48854 * r48854;
        double r48856 = 2.0;
        double r48857 = r48855 * r48856;
        double r48858 = 1.0;
        double r48859 = r48857 - r48858;
        return r48859;
}

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