Average Error: 0.0 → 0.0
Time: 2.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 r38965 = x;
        double r38966 = r38965 * r38965;
        double r38967 = 2.0;
        double r38968 = r38966 * r38967;
        double r38969 = 1.0;
        double r38970 = r38968 - r38969;
        return r38970;
}

double f(double x) {
        double r38971 = x;
        double r38972 = r38971 * r38971;
        double r38973 = 2.0;
        double r38974 = r38972 * r38973;
        double r38975 = 1.0;
        double r38976 = r38974 - r38975;
        return r38976;
}

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