Average Error: 0.0 → 0.0
Time: 5.9s
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 r28821 = x;
        double r28822 = r28821 * r28821;
        double r28823 = 2.0;
        double r28824 = r28822 * r28823;
        double r28825 = 1.0;
        double r28826 = r28824 - r28825;
        return r28826;
}

double f(double x) {
        double r28827 = x;
        double r28828 = r28827 * r28827;
        double r28829 = 2.0;
        double r28830 = r28828 * r28829;
        double r28831 = 1.0;
        double r28832 = r28830 - r28831;
        return r28832;
}

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