Average Error: 0.0 → 0.0
Time: 496.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 r40472 = x;
        double r40473 = r40472 * r40472;
        double r40474 = 2.0;
        double r40475 = r40473 * r40474;
        double r40476 = 1.0;
        double r40477 = r40475 - r40476;
        return r40477;
}

double f(double x) {
        double r40478 = x;
        double r40479 = r40478 * r40478;
        double r40480 = 2.0;
        double r40481 = r40479 * r40480;
        double r40482 = 1.0;
        double r40483 = r40481 - r40482;
        return r40483;
}

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