Average Error: 0.1 → 0.2
Time: 7.8s
Precision: 64
\[\frac{x \cdot x - 3}{6}\]
\[0.1666666666666666574148081281236954964697 \cdot {x}^{2} - 0.5\]
\frac{x \cdot x - 3}{6}
0.1666666666666666574148081281236954964697 \cdot {x}^{2} - 0.5
double f(double x) {
        double r41795 = x;
        double r41796 = r41795 * r41795;
        double r41797 = 3.0;
        double r41798 = r41796 - r41797;
        double r41799 = 6.0;
        double r41800 = r41798 / r41799;
        return r41800;
}

double f(double x) {
        double r41801 = 0.16666666666666666;
        double r41802 = x;
        double r41803 = 2.0;
        double r41804 = pow(r41802, r41803);
        double r41805 = r41801 * r41804;
        double r41806 = 0.5;
        double r41807 = r41805 - r41806;
        return r41807;
}

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.1666666666666666574148081281236954964697 \cdot {x}^{2} - 0.5}\]
  3. Final simplification0.2

    \[\leadsto 0.1666666666666666574148081281236954964697 \cdot {x}^{2} - 0.5\]

Reproduce

herbie shell --seed 2019294 
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, H"
  :precision binary64
  (/ (- (* x x) 3) 6))