Average Error: 0.0 → 0.0
Time: 5.2s
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 r39682 = x;
        double r39683 = r39682 * r39682;
        double r39684 = 2.0;
        double r39685 = r39683 * r39684;
        double r39686 = 1.0;
        double r39687 = r39685 - r39686;
        return r39687;
}

double f(double x) {
        double r39688 = x;
        double r39689 = r39688 * r39688;
        double r39690 = 2.0;
        double r39691 = r39689 * r39690;
        double r39692 = 1.0;
        double r39693 = r39691 - r39692;
        return r39693;
}

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