Average Error: 0.1 → 0.2
Time: 2.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 r80320 = x;
        double r80321 = r80320 * r80320;
        double r80322 = 3.0;
        double r80323 = r80321 - r80322;
        double r80324 = 6.0;
        double r80325 = r80323 / r80324;
        return r80325;
}

double f(double x) {
        double r80326 = 0.16666666666666666;
        double r80327 = x;
        double r80328 = 2.0;
        double r80329 = pow(r80327, r80328);
        double r80330 = r80326 * r80329;
        double r80331 = 0.5;
        double r80332 = r80330 - r80331;
        return r80332;
}

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