Average Error: 0.0 → 0.0
Time: 506.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 r82848 = x;
        double r82849 = r82848 * r82848;
        double r82850 = 2.0;
        double r82851 = r82849 * r82850;
        double r82852 = 1.0;
        double r82853 = r82851 - r82852;
        return r82853;
}

double f(double x) {
        double r82854 = x;
        double r82855 = r82854 * r82854;
        double r82856 = 2.0;
        double r82857 = r82855 * r82856;
        double r82858 = 1.0;
        double r82859 = r82857 - r82858;
        return r82859;
}

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