Average Error: 0.1 → 0.2
Time: 14.1s
Precision: 64
\[\frac{x \cdot x - 3.0}{6.0}\]
\[0.16666666666666666 \cdot \left(x \cdot x\right) - 0.5\]
\frac{x \cdot x - 3.0}{6.0}
0.16666666666666666 \cdot \left(x \cdot x\right) - 0.5
double f(double x) {
        double r3457628 = x;
        double r3457629 = r3457628 * r3457628;
        double r3457630 = 3.0;
        double r3457631 = r3457629 - r3457630;
        double r3457632 = 6.0;
        double r3457633 = r3457631 / r3457632;
        return r3457633;
}

double f(double x) {
        double r3457634 = 0.16666666666666666;
        double r3457635 = x;
        double r3457636 = r3457635 * r3457635;
        double r3457637 = r3457634 * r3457636;
        double r3457638 = 0.5;
        double r3457639 = r3457637 - r3457638;
        return r3457639;
}

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.0}{6.0}\]
  2. Taylor expanded around 0 0.2

    \[\leadsto \color{blue}{0.16666666666666666 \cdot {x}^{2} - 0.5}\]
  3. Simplified0.2

    \[\leadsto \color{blue}{0.16666666666666666 \cdot \left(x \cdot x\right) - 0.5}\]
  4. Final simplification0.2

    \[\leadsto 0.16666666666666666 \cdot \left(x \cdot x\right) - 0.5\]

Reproduce

herbie shell --seed 2019163 
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteBetaWorker from math-functions-0.1.5.2, H"
  (/ (- (* x x) 3.0) 6.0))