Average Error: 0.1 → 0.2
Time: 13.4s
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 r123380 = x;
        double r123381 = r123380 * r123380;
        double r123382 = 3.0;
        double r123383 = r123381 - r123382;
        double r123384 = 6.0;
        double r123385 = r123383 / r123384;
        return r123385;
}

double f(double x) {
        double r123386 = 0.16666666666666666;
        double r123387 = x;
        double r123388 = 2.0;
        double r123389 = pow(r123387, r123388);
        double r123390 = r123386 * r123389;
        double r123391 = 0.5;
        double r123392 = r123390 - r123391;
        return r123392;
}

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