Average Error: 0.1 → 0.2
Time: 2.5s
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 r82479 = x;
        double r82480 = r82479 * r82479;
        double r82481 = 3.0;
        double r82482 = r82480 - r82481;
        double r82483 = 6.0;
        double r82484 = r82482 / r82483;
        return r82484;
}

double f(double x) {
        double r82485 = 0.16666666666666666;
        double r82486 = x;
        double r82487 = 2.0;
        double r82488 = pow(r82486, r82487);
        double r82489 = r82485 * r82488;
        double r82490 = 0.5;
        double r82491 = r82489 - r82490;
        return r82491;
}

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