Average Error: 0.1 → 0.1
Time: 2.1s
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 r55719 = x;
        double r55720 = r55719 * r55719;
        double r55721 = 3.0;
        double r55722 = r55720 - r55721;
        double r55723 = 6.0;
        double r55724 = r55722 / r55723;
        return r55724;
}

double f(double x) {
        double r55725 = 0.16666666666666666;
        double r55726 = x;
        double r55727 = 2.0;
        double r55728 = pow(r55726, r55727);
        double r55729 = r55725 * r55728;
        double r55730 = 0.5;
        double r55731 = r55729 - r55730;
        return r55731;
}

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

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

Reproduce

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