Average Error: 0.0 → 0.0
Time: 14.7s
Precision: 64
\[\frac{2.30753 + x \cdot 0.27061}{1.0 + x \cdot \left(0.99229 + x \cdot 0.04481\right)} - x\]
\[\left(-x\right) + \frac{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\mathsf{fma}\left(\mathsf{fma}\left(x, 0.04481, 0.99229\right), x, 1.0\right)}\]
\frac{2.30753 + x \cdot 0.27061}{1.0 + x \cdot \left(0.99229 + x \cdot 0.04481\right)} - x
\left(-x\right) + \frac{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\mathsf{fma}\left(\mathsf{fma}\left(x, 0.04481, 0.99229\right), x, 1.0\right)}
double f(double x) {
        double r2575386 = 2.30753;
        double r2575387 = x;
        double r2575388 = 0.27061;
        double r2575389 = r2575387 * r2575388;
        double r2575390 = r2575386 + r2575389;
        double r2575391 = 1.0;
        double r2575392 = 0.99229;
        double r2575393 = 0.04481;
        double r2575394 = r2575387 * r2575393;
        double r2575395 = r2575392 + r2575394;
        double r2575396 = r2575387 * r2575395;
        double r2575397 = r2575391 + r2575396;
        double r2575398 = r2575390 / r2575397;
        double r2575399 = r2575398 - r2575387;
        return r2575399;
}

double f(double x) {
        double r2575400 = x;
        double r2575401 = -r2575400;
        double r2575402 = 0.27061;
        double r2575403 = 2.30753;
        double r2575404 = fma(r2575400, r2575402, r2575403);
        double r2575405 = 0.04481;
        double r2575406 = 0.99229;
        double r2575407 = fma(r2575400, r2575405, r2575406);
        double r2575408 = 1.0;
        double r2575409 = fma(r2575407, r2575400, r2575408);
        double r2575410 = r2575404 / r2575409;
        double r2575411 = r2575401 + r2575410;
        return r2575411;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\frac{2.30753 + x \cdot 0.27061}{1.0 + x \cdot \left(0.99229 + x \cdot 0.04481\right)} - x\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\mathsf{fma}\left(\mathsf{fma}\left(x, 0.04481, 0.99229\right), x, 1.0\right)} - x}\]
  3. Using strategy rm
  4. Applied sub-neg0.0

    \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\mathsf{fma}\left(\mathsf{fma}\left(x, 0.04481, 0.99229\right), x, 1.0\right)} + \left(-x\right)}\]
  5. Final simplification0.0

    \[\leadsto \left(-x\right) + \frac{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}{\mathsf{fma}\left(\mathsf{fma}\left(x, 0.04481, 0.99229\right), x, 1.0\right)}\]

Reproduce

herbie shell --seed 2019164 +o rules:numerics
(FPCore (x)
  :name "Numeric.SpecFunctions:invIncompleteGamma from math-functions-0.1.5.2, C"
  (- (/ (+ 2.30753 (* x 0.27061)) (+ 1.0 (* x (+ 0.99229 (* x 0.04481))))) x))