Average Error: 0.0 → 0.0
Time: 4.8s
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 r39602 = x;
        double r39603 = r39602 * r39602;
        double r39604 = 2.0;
        double r39605 = r39603 * r39604;
        double r39606 = 1.0;
        double r39607 = r39605 - r39606;
        return r39607;
}

double f(double x) {
        double r39608 = x;
        double r39609 = r39608 * r39608;
        double r39610 = 2.0;
        double r39611 = r39609 * r39610;
        double r39612 = 1.0;
        double r39613 = r39611 - r39612;
        return r39613;
}

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