Average Error: 0.0 → 0.0
Time: 855.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 r27996 = x;
        double r27997 = r27996 * r27996;
        double r27998 = 2.0;
        double r27999 = r27997 * r27998;
        double r28000 = 1.0;
        double r28001 = r27999 - r28000;
        return r28001;
}

double f(double x) {
        double r28002 = x;
        double r28003 = r28002 * r28002;
        double r28004 = 2.0;
        double r28005 = r28003 * r28004;
        double r28006 = 1.0;
        double r28007 = r28005 - r28006;
        return r28007;
}

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