Average Error: 0.1 → 0.1
Time: 1.9s
Precision: 64
\[\frac{x \cdot x - 3}{6}\]
\[\left(x \cdot 0.166666666666666657\right) \cdot x - 0.5\]
\frac{x \cdot x - 3}{6}
\left(x \cdot 0.166666666666666657\right) \cdot x - 0.5
double f(double x) {
        double r87277 = x;
        double r87278 = r87277 * r87277;
        double r87279 = 3.0;
        double r87280 = r87278 - r87279;
        double r87281 = 6.0;
        double r87282 = r87280 / r87281;
        return r87282;
}

double f(double x) {
        double r87283 = x;
        double r87284 = 0.16666666666666666;
        double r87285 = r87283 * r87284;
        double r87286 = r87285 * r87283;
        double r87287 = 0.5;
        double r87288 = r87286 - r87287;
        return r87288;
}

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.1

    \[\leadsto \color{blue}{0.166666666666666657 \cdot {x}^{2} - 0.5}\]
  3. Using strategy rm
  4. Applied unpow20.1

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

    \[\leadsto \color{blue}{\left(0.166666666666666657 \cdot x\right) \cdot x} - 0.5\]
  6. Simplified0.1

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

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

Reproduce

herbie shell --seed 2020036 
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, H"
  :precision binary64
  (/ (- (* x x) 3) 6))