Average Error: 0.0 → 0.0
Time: 865.0ms
Precision: 64
\[\left(x \cdot x\right) \cdot 2.0 - 1.0\]
\[2.0 \cdot \left(x \cdot x\right) - 1.0\]
\left(x \cdot x\right) \cdot 2.0 - 1.0
2.0 \cdot \left(x \cdot x\right) - 1.0
double f(double x) {
        double r928965 = x;
        double r928966 = r928965 * r928965;
        double r928967 = 2.0;
        double r928968 = r928966 * r928967;
        double r928969 = 1.0;
        double r928970 = r928968 - r928969;
        return r928970;
}

double f(double x) {
        double r928971 = 2.0;
        double r928972 = x;
        double r928973 = r928972 * r928972;
        double r928974 = r928971 * r928973;
        double r928975 = 1.0;
        double r928976 = r928974 - r928975;
        return r928976;
}

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.0 - 1.0\]
  2. Final simplification0.0

    \[\leadsto 2.0 \cdot \left(x \cdot x\right) - 1.0\]

Reproduce

herbie shell --seed 2019156 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  (- (* (* x x) 2.0) 1.0))