Average Error: 0.1 → 0.1
Time: 12.3s
Precision: 64
\[\frac{x \cdot x - 3.0}{6.0}\]
\[\sqrt{0.16666666666666666} \cdot \left(\sqrt{0.16666666666666666} \cdot \left(x \cdot x\right)\right) - 0.5\]
\frac{x \cdot x - 3.0}{6.0}
\sqrt{0.16666666666666666} \cdot \left(\sqrt{0.16666666666666666} \cdot \left(x \cdot x\right)\right) - 0.5
double f(double x) {
        double r2535638 = x;
        double r2535639 = r2535638 * r2535638;
        double r2535640 = 3.0;
        double r2535641 = r2535639 - r2535640;
        double r2535642 = 6.0;
        double r2535643 = r2535641 / r2535642;
        return r2535643;
}

double f(double x) {
        double r2535644 = 0.16666666666666666;
        double r2535645 = sqrt(r2535644);
        double r2535646 = x;
        double r2535647 = r2535646 * r2535646;
        double r2535648 = r2535645 * r2535647;
        double r2535649 = r2535645 * r2535648;
        double r2535650 = 0.5;
        double r2535651 = r2535649 - r2535650;
        return r2535651;
}

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. Using strategy rm
  5. Applied add-sqr-sqrt0.2

    \[\leadsto \left(x \cdot x\right) \cdot \color{blue}{\left(\sqrt{0.16666666666666666} \cdot \sqrt{0.16666666666666666}\right)} - 0.5\]
  6. Applied associate-*r*0.1

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

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

Reproduce

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