Average Error: 0.1 → 0.2
Time: 1.8s
Precision: 64
\[\frac{x \cdot x - 3}{6}\]
\[0.166666666666666657 \cdot {x}^{2} - 0.5\]
\frac{x \cdot x - 3}{6}
0.166666666666666657 \cdot {x}^{2} - 0.5
double f(double x) {
        double r70535 = x;
        double r70536 = r70535 * r70535;
        double r70537 = 3.0;
        double r70538 = r70536 - r70537;
        double r70539 = 6.0;
        double r70540 = r70538 / r70539;
        return r70540;
}

double f(double x) {
        double r70541 = 0.16666666666666666;
        double r70542 = x;
        double r70543 = 2.0;
        double r70544 = pow(r70542, r70543);
        double r70545 = r70541 * r70544;
        double r70546 = 0.5;
        double r70547 = r70545 - r70546;
        return r70547;
}

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.166666666666666657 \cdot {x}^{2} - 0.5}\]
  3. Final simplification0.2

    \[\leadsto 0.166666666666666657 \cdot {x}^{2} - 0.5\]

Reproduce

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