Average Error: 0.1 → 0.2
Time: 2.2s
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 r57997 = x;
        double r57998 = r57997 * r57997;
        double r57999 = 3.0;
        double r58000 = r57998 - r57999;
        double r58001 = 6.0;
        double r58002 = r58000 / r58001;
        return r58002;
}

double f(double x) {
        double r58003 = 0.16666666666666666;
        double r58004 = x;
        double r58005 = 2.0;
        double r58006 = pow(r58004, r58005);
        double r58007 = r58003 * r58006;
        double r58008 = 0.5;
        double r58009 = r58007 - r58008;
        return r58009;
}

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