Average Error: 0.1 → 0.2
Time: 12.3s
Precision: 64
\[\frac{x \cdot x - 3}{6}\]
\[\mathsf{fma}\left(x \cdot x, 0.1666666666666666574148081281236954964697, -0.5\right)\]
\frac{x \cdot x - 3}{6}
\mathsf{fma}\left(x \cdot x, 0.1666666666666666574148081281236954964697, -0.5\right)
double f(double x) {
        double r50623 = x;
        double r50624 = r50623 * r50623;
        double r50625 = 3.0;
        double r50626 = r50624 - r50625;
        double r50627 = 6.0;
        double r50628 = r50626 / r50627;
        return r50628;
}

double f(double x) {
        double r50629 = x;
        double r50630 = r50629 * r50629;
        double r50631 = 0.16666666666666666;
        double r50632 = 0.5;
        double r50633 = -r50632;
        double r50634 = fma(r50630, r50631, r50633);
        return r50634;
}

Error

Bits error versus x

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. Simplified0.2

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

    \[\leadsto \mathsf{fma}\left(x \cdot x, 0.1666666666666666574148081281236954964697, -0.5\right)\]

Reproduce

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