Average Error: 0.0 → 0.0
Time: 349.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 r52336 = x;
        double r52337 = r52336 * r52336;
        double r52338 = 2.0;
        double r52339 = r52337 * r52338;
        double r52340 = 1.0;
        double r52341 = r52339 - r52340;
        return r52341;
}

double f(double x) {
        double r52342 = x;
        double r52343 = r52342 * r52342;
        double r52344 = 2.0;
        double r52345 = r52343 * r52344;
        double r52346 = 1.0;
        double r52347 = r52345 - r52346;
        return r52347;
}

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