Average Error: 0.1 → 0.2
Time: 1.7s
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 r61821 = x;
        double r61822 = r61821 * r61821;
        double r61823 = 3.0;
        double r61824 = r61822 - r61823;
        double r61825 = 6.0;
        double r61826 = r61824 / r61825;
        return r61826;
}

double f(double x) {
        double r61827 = 0.16666666666666666;
        double r61828 = x;
        double r61829 = 2.0;
        double r61830 = pow(r61828, r61829);
        double r61831 = r61827 * r61830;
        double r61832 = 0.5;
        double r61833 = r61831 - r61832;
        return r61833;
}

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