Average Error: 0.2 → 0.1
Time: 14.3s
Precision: 64
\[\frac{x \cdot x - 3.0}{6.0}\]
\[x \cdot \left(x \cdot 0.16666666666666666\right) - 0.5\]
\frac{x \cdot x - 3.0}{6.0}
x \cdot \left(x \cdot 0.16666666666666666\right) - 0.5
double f(double x) {
        double r2605347 = x;
        double r2605348 = r2605347 * r2605347;
        double r2605349 = 3.0;
        double r2605350 = r2605348 - r2605349;
        double r2605351 = 6.0;
        double r2605352 = r2605350 / r2605351;
        return r2605352;
}

double f(double x) {
        double r2605353 = x;
        double r2605354 = 0.16666666666666666;
        double r2605355 = r2605353 * r2605354;
        double r2605356 = r2605353 * r2605355;
        double r2605357 = 0.5;
        double r2605358 = r2605356 - r2605357;
        return r2605358;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.2

    \[\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 associate-*l*0.1

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

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

Reproduce

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