Average Error: 0.1 → 0.2
Time: 11.3s
Precision: 64
\[\frac{x \cdot x - 3}{6}\]
\[\left(x \cdot \sqrt{0.1666666666666666574148081281236954964697}\right) \cdot \left(x \cdot \sqrt{0.1666666666666666574148081281236954964697}\right) - 0.5\]
\frac{x \cdot x - 3}{6}
\left(x \cdot \sqrt{0.1666666666666666574148081281236954964697}\right) \cdot \left(x \cdot \sqrt{0.1666666666666666574148081281236954964697}\right) - 0.5
double f(double x) {
        double r2907054 = x;
        double r2907055 = r2907054 * r2907054;
        double r2907056 = 3.0;
        double r2907057 = r2907055 - r2907056;
        double r2907058 = 6.0;
        double r2907059 = r2907057 / r2907058;
        return r2907059;
}

double f(double x) {
        double r2907060 = x;
        double r2907061 = 0.16666666666666666;
        double r2907062 = sqrt(r2907061);
        double r2907063 = r2907060 * r2907062;
        double r2907064 = r2907063 * r2907063;
        double r2907065 = 0.5;
        double r2907066 = r2907064 - r2907065;
        return r2907066;
}

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

    \[\leadsto \color{blue}{0.1666666666666666574148081281236954964697 \cdot \left(x \cdot x\right) - 0.5}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt0.2

    \[\leadsto \color{blue}{\left(\sqrt{0.1666666666666666574148081281236954964697} \cdot \sqrt{0.1666666666666666574148081281236954964697}\right)} \cdot \left(x \cdot x\right) - 0.5\]
  6. Applied unswap-sqr0.2

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

    \[\leadsto \left(x \cdot \sqrt{0.1666666666666666574148081281236954964697}\right) \cdot \left(x \cdot \sqrt{0.1666666666666666574148081281236954964697}\right) - 0.5\]

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))