Average Error: 0.0 → 0.0
Time: 8.3s
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 r56456 = x;
        double r56457 = r56456 * r56456;
        double r56458 = 2.0;
        double r56459 = r56457 * r56458;
        double r56460 = 1.0;
        double r56461 = r56459 - r56460;
        return r56461;
}

double f(double x) {
        double r56462 = x;
        double r56463 = r56462 * r56462;
        double r56464 = 2.0;
        double r56465 = r56463 * r56464;
        double r56466 = 1.0;
        double r56467 = r56465 - r56466;
        return r56467;
}

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