Average Error: 0.0 → 0.0
Time: 6.0s
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 r6807133 = x;
        double r6807134 = r6807133 * r6807133;
        double r6807135 = 2.0;
        double r6807136 = r6807134 * r6807135;
        double r6807137 = 1.0;
        double r6807138 = r6807136 - r6807137;
        return r6807138;
}

double f(double x) {
        double r6807139 = x;
        double r6807140 = r6807139 * r6807139;
        double r6807141 = 2.0;
        double r6807142 = r6807140 * r6807141;
        double r6807143 = 1.0;
        double r6807144 = r6807142 - r6807143;
        return r6807144;
}

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 2019173 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  (- (* (* x x) 2.0) 1.0))