Average Error: 0.0 → 0.0
Time: 550.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 r25349 = x;
        double r25350 = r25349 * r25349;
        double r25351 = 2.0;
        double r25352 = r25350 * r25351;
        double r25353 = 1.0;
        double r25354 = r25352 - r25353;
        return r25354;
}

double f(double x) {
        double r25355 = x;
        double r25356 = r25355 * r25355;
        double r25357 = 2.0;
        double r25358 = r25356 * r25357;
        double r25359 = 1.0;
        double r25360 = r25358 - r25359;
        return r25360;
}

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