Average Error: 0.0 → 0.0
Time: 6.1s
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 r22584 = x;
        double r22585 = r22584 * r22584;
        double r22586 = 2.0;
        double r22587 = r22585 * r22586;
        double r22588 = 1.0;
        double r22589 = r22587 - r22588;
        return r22589;
}

double f(double x) {
        double r22590 = x;
        double r22591 = r22590 * r22590;
        double r22592 = 2.0;
        double r22593 = r22591 * r22592;
        double r22594 = 1.0;
        double r22595 = r22593 - r22594;
        return r22595;
}

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