Average Error: 0.0 → 0.0
Time: 4.5s
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 r42572 = x;
        double r42573 = r42572 * r42572;
        double r42574 = 2.0;
        double r42575 = r42573 * r42574;
        double r42576 = 1.0;
        double r42577 = r42575 - r42576;
        return r42577;
}

double f(double x) {
        double r42578 = x;
        double r42579 = r42578 * r42578;
        double r42580 = 2.0;
        double r42581 = r42579 * r42580;
        double r42582 = 1.0;
        double r42583 = r42581 - r42582;
        return r42583;
}

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