Average Error: 0.1 → 0.2
Time: 11.9s
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 r68212 = x;
        double r68213 = r68212 * r68212;
        double r68214 = 3.0;
        double r68215 = r68213 - r68214;
        double r68216 = 6.0;
        double r68217 = r68215 / r68216;
        return r68217;
}

double f(double x) {
        double r68218 = 0.16666666666666666;
        double r68219 = x;
        double r68220 = 2.0;
        double r68221 = pow(r68219, r68220);
        double r68222 = r68218 * r68221;
        double r68223 = 0.5;
        double r68224 = r68222 - r68223;
        return r68224;
}

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))