Average Error: 0.1 → 0.2
Time: 15.6s
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 r60279 = x;
        double r60280 = r60279 * r60279;
        double r60281 = 3.0;
        double r60282 = r60280 - r60281;
        double r60283 = 6.0;
        double r60284 = r60282 / r60283;
        return r60284;
}

double f(double x) {
        double r60285 = x;
        double r60286 = r60285 * r60285;
        double r60287 = 0.16666666666666666;
        double r60288 = 0.5;
        double r60289 = -r60288;
        double r60290 = fma(r60286, r60287, r60289);
        return r60290;
}

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 2019179 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, H"
  (/ (- (* x x) 3.0) 6.0))