Average Error: 0.1 → 0.2
Time: 1.3s
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 r60449 = x;
        double r60450 = r60449 * r60449;
        double r60451 = 3.0;
        double r60452 = r60450 - r60451;
        double r60453 = 6.0;
        double r60454 = r60452 / r60453;
        return r60454;
}

double f(double x) {
        double r60455 = 0.16666666666666666;
        double r60456 = x;
        double r60457 = 2.0;
        double r60458 = pow(r60456, r60457);
        double r60459 = r60455 * r60458;
        double r60460 = 0.5;
        double r60461 = r60459 - r60460;
        return r60461;
}

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 2020024 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, H"
  :precision binary64
  (/ (- (* x x) 3) 6))