Average Error: 0.0 → 0.0
Time: 6.5s
Precision: 64
\[\frac{2.30753 + x \cdot 0.27061}{1.0 + x \cdot \left(0.99229 + x \cdot 0.04481\right)} - x\]
\[\frac{1}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(x, 0.04481, 0.99229\right), x, 1.0\right)}{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}} - x\]
\frac{2.30753 + x \cdot 0.27061}{1.0 + x \cdot \left(0.99229 + x \cdot 0.04481\right)} - x
\frac{1}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(x, 0.04481, 0.99229\right), x, 1.0\right)}{\mathsf{fma}\left(x, 0.27061, 2.30753\right)}} - x
double f(double x) {
        double r933159 = 2.30753;
        double r933160 = x;
        double r933161 = 0.27061;
        double r933162 = r933160 * r933161;
        double r933163 = r933159 + r933162;
        double r933164 = 1.0;
        double r933165 = 0.99229;
        double r933166 = 0.04481;
        double r933167 = r933160 * r933166;
        double r933168 = r933165 + r933167;
        double r933169 = r933160 * r933168;
        double r933170 = r933164 + r933169;
        double r933171 = r933163 / r933170;
        double r933172 = r933171 - r933160;
        return r933172;
}

double f(double x) {
        double r933173 = 1.0;
        double r933174 = x;
        double r933175 = 0.04481;
        double r933176 = 0.99229;
        double r933177 = fma(r933174, r933175, r933176);
        double r933178 = 1.0;
        double r933179 = fma(r933177, r933174, r933178);
        double r933180 = 0.27061;
        double r933181 = 2.30753;
        double r933182 = fma(r933174, r933180, r933181);
        double r933183 = r933179 / r933182;
        double r933184 = r933173 / r933183;
        double r933185 = r933184 - r933174;
        return r933185;
}

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 clear-num0.0

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

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

Reproduce

herbie shell --seed 2019156 +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))