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

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

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