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 r3975158 = x;
        double r3975159 = r3975158 * r3975158;
        double r3975160 = 3.0;
        double r3975161 = r3975159 - r3975160;
        double r3975162 = 6.0;
        double r3975163 = r3975161 / r3975162;
        return r3975163;
}

double f(double x) {
        double r3975164 = 0.16666666666666666;
        double r3975165 = x;
        double r3975166 = r3975165 * r3975165;
        double r3975167 = r3975164 * r3975166;
        double r3975168 = 0.5;
        double r3975169 = r3975167 - r3975168;
        return r3975169;
}

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))