Average Error: 0.1 → 0.2
Time: 31.8s
Precision: 64
\[\frac{x \cdot x - 3.0}{6.0}\]
\[\left(x \cdot \sqrt{0.16666666666666666}\right) \cdot \left(x \cdot \sqrt{0.16666666666666666}\right) - 0.5\]
\frac{x \cdot x - 3.0}{6.0}
\left(x \cdot \sqrt{0.16666666666666666}\right) \cdot \left(x \cdot \sqrt{0.16666666666666666}\right) - 0.5
double f(double x) {
        double r3641223 = x;
        double r3641224 = r3641223 * r3641223;
        double r3641225 = 3.0;
        double r3641226 = r3641224 - r3641225;
        double r3641227 = 6.0;
        double r3641228 = r3641226 / r3641227;
        return r3641228;
}

double f(double x) {
        double r3641229 = x;
        double r3641230 = 0.16666666666666666;
        double r3641231 = sqrt(r3641230);
        double r3641232 = r3641229 * r3641231;
        double r3641233 = r3641232 * r3641232;
        double r3641234 = 0.5;
        double r3641235 = r3641233 - r3641234;
        return r3641235;
}

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}{0.16666666666666666 \cdot \left(x \cdot x\right) - 0.5}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt0.2

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

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

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

Reproduce

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