Average Error: 0.1 → 0.2
Time: 13.3s
Precision: 64
\[\frac{x \cdot x - 3}{6}\]
\[0.166666666666666657 \cdot {x}^{2} - 0.5\]
\frac{x \cdot x - 3}{6}
0.166666666666666657 \cdot {x}^{2} - 0.5
double f(double x) {
        double r79312 = x;
        double r79313 = r79312 * r79312;
        double r79314 = 3.0;
        double r79315 = r79313 - r79314;
        double r79316 = 6.0;
        double r79317 = r79315 / r79316;
        return r79317;
}

double f(double x) {
        double r79318 = 0.16666666666666666;
        double r79319 = x;
        double r79320 = 2.0;
        double r79321 = pow(r79319, r79320);
        double r79322 = r79318 * r79321;
        double r79323 = 0.5;
        double r79324 = r79322 - r79323;
        return r79324;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\frac{x \cdot x - 3}{6}\]
  2. Taylor expanded around 0 0.2

    \[\leadsto \color{blue}{0.166666666666666657 \cdot {x}^{2} - 0.5}\]
  3. Final simplification0.2

    \[\leadsto 0.166666666666666657 \cdot {x}^{2} - 0.5\]

Reproduce

herbie shell --seed 2020042 
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, H"
  :precision binary64
  (/ (- (* x x) 3) 6))