Average Error: 0.0 → 0.0
Time: 1.2s
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 r48201 = x;
        double r48202 = r48201 * r48201;
        double r48203 = 2.0;
        double r48204 = r48202 * r48203;
        double r48205 = 1.0;
        double r48206 = r48204 - r48205;
        return r48206;
}

double f(double x) {
        double r48207 = x;
        double r48208 = r48207 * r48207;
        double r48209 = 2.0;
        double r48210 = r48208 * r48209;
        double r48211 = 1.0;
        double r48212 = r48210 - r48211;
        return r48212;
}

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