Average Error: 0.1 → 0.2
Time: 12.7s
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 r71268 = x;
        double r71269 = r71268 * r71268;
        double r71270 = 3.0;
        double r71271 = r71269 - r71270;
        double r71272 = 6.0;
        double r71273 = r71271 / r71272;
        return r71273;
}

double f(double x) {
        double r71274 = 0.16666666666666666;
        double r71275 = x;
        double r71276 = 2.0;
        double r71277 = pow(r71275, r71276);
        double r71278 = r71274 * r71277;
        double r71279 = 0.5;
        double r71280 = r71278 - r71279;
        return r71280;
}

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 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, H"
  :precision binary64
  (/ (- (* x x) 3) 6))