Average Error: 0.0 → 0.0
Time: 1.9s
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 r46023 = x;
        double r46024 = r46023 * r46023;
        double r46025 = 2.0;
        double r46026 = r46024 * r46025;
        double r46027 = 1.0;
        double r46028 = r46026 - r46027;
        return r46028;
}

double f(double x) {
        double r46029 = x;
        double r46030 = r46029 * r46029;
        double r46031 = 2.0;
        double r46032 = r46030 * r46031;
        double r46033 = 1.0;
        double r46034 = r46032 - r46033;
        return r46034;
}

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