Average Error: 0.0 → 0.0
Time: 465.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 r27990 = x;
        double r27991 = r27990 * r27990;
        double r27992 = 2.0;
        double r27993 = r27991 * r27992;
        double r27994 = 1.0;
        double r27995 = r27993 - r27994;
        return r27995;
}

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;
}

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