Average Error: 0.1 → 0.2
Time: 14.5s
Precision: 64
\[\frac{x \cdot x - 3.0}{6.0}\]
\[0.16666666666666666 \cdot \left(x \cdot x\right) - 0.5\]
\frac{x \cdot x - 3.0}{6.0}
0.16666666666666666 \cdot \left(x \cdot x\right) - 0.5
double f(double x) {
        double r4313759 = x;
        double r4313760 = r4313759 * r4313759;
        double r4313761 = 3.0;
        double r4313762 = r4313760 - r4313761;
        double r4313763 = 6.0;
        double r4313764 = r4313762 / r4313763;
        return r4313764;
}

double f(double x) {
        double r4313765 = 0.16666666666666666;
        double r4313766 = x;
        double r4313767 = r4313766 * r4313766;
        double r4313768 = r4313765 * r4313767;
        double r4313769 = 0.5;
        double r4313770 = r4313768 - r4313769;
        return r4313770;
}

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.0}{6.0}\]
  2. Taylor expanded around 0 0.2

    \[\leadsto \color{blue}{0.16666666666666666 \cdot {x}^{2} - 0.5}\]
  3. Simplified0.2

    \[\leadsto \color{blue}{\left(x \cdot x\right) \cdot 0.16666666666666666 - 0.5}\]
  4. Final simplification0.2

    \[\leadsto 0.16666666666666666 \cdot \left(x \cdot x\right) - 0.5\]

Reproduce

herbie shell --seed 2019163 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, H"
  (/ (- (* x x) 3.0) 6.0))