Average Error: 0.0 → 0.0
Time: 1.5s
Precision: 64
\[\left(x \cdot x\right) \cdot 2 - 1\]
\[2 \cdot \left(x \cdot x\right) - 1\]
\left(x \cdot x\right) \cdot 2 - 1
2 \cdot \left(x \cdot x\right) - 1
double f(double x) {
        double r36017 = x;
        double r36018 = r36017 * r36017;
        double r36019 = 2.0;
        double r36020 = r36018 * r36019;
        double r36021 = 1.0;
        double r36022 = r36020 - r36021;
        return r36022;
}

double f(double x) {
        double r36023 = 2.0;
        double r36024 = x;
        double r36025 = r36024 * r36024;
        double r36026 = r36023 * r36025;
        double r36027 = 1.0;
        double r36028 = r36026 - r36027;
        return r36028;
}

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 2 \cdot \left(x \cdot x\right) - 1\]

Reproduce

herbie shell --seed 2019179 
(FPCore (x)
  :name "Numeric.SpecFunctions:logGammaCorrection from math-functions-0.1.5.2"
  (- (* (* x x) 2.0) 1.0))