Average Error: 0.1 → 0.1
Time: 1.8s
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 r70015 = x;
        double r70016 = r70015 * r70015;
        double r70017 = 3.0;
        double r70018 = r70016 - r70017;
        double r70019 = 6.0;
        double r70020 = r70018 / r70019;
        return r70020;
}

double f(double x) {
        double r70021 = 0.16666666666666666;
        double r70022 = x;
        double r70023 = 2.0;
        double r70024 = pow(r70022, r70023);
        double r70025 = r70021 * r70024;
        double r70026 = 0.5;
        double r70027 = r70025 - r70026;
        return r70027;
}

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