Average Error: 0.0 → 0.1
Time: 3.0s
Precision: 64
\[\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\]
\[\left(\frac{\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} \cdot \mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} - x\right) + \mathsf{fma}\left(-x, 1, x\right)\]
\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x
\left(\frac{\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} \cdot \mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} - x\right) + \mathsf{fma}\left(-x, 1, x\right)
double f(double x) {
        double r70177 = 2.30753;
        double r70178 = x;
        double r70179 = 0.27061;
        double r70180 = r70178 * r70179;
        double r70181 = r70177 + r70180;
        double r70182 = 1.0;
        double r70183 = 0.99229;
        double r70184 = 0.04481;
        double r70185 = r70178 * r70184;
        double r70186 = r70183 + r70185;
        double r70187 = r70178 * r70186;
        double r70188 = r70182 + r70187;
        double r70189 = r70181 / r70188;
        double r70190 = r70189 - r70178;
        return r70190;
}

double f(double x) {
        double r70191 = 1.0;
        double r70192 = 1.0;
        double r70193 = x;
        double r70194 = 0.99229;
        double r70195 = 0.04481;
        double r70196 = r70193 * r70195;
        double r70197 = r70194 + r70196;
        double r70198 = r70193 * r70197;
        double r70199 = r70192 + r70198;
        double r70200 = sqrt(r70199);
        double r70201 = r70191 / r70200;
        double r70202 = 0.27061;
        double r70203 = 2.30753;
        double r70204 = fma(r70202, r70193, r70203);
        double r70205 = r70201 * r70204;
        double r70206 = r70205 / r70200;
        double r70207 = r70206 - r70193;
        double r70208 = -r70193;
        double r70209 = fma(r70208, r70191, r70193);
        double r70210 = r70207 + r70209;
        return r70210;
}

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - x\]
  2. Using strategy rm
  3. Applied add-cube-cbrt0.7

    \[\leadsto \frac{2.30753 + x \cdot 0.27061000000000002}{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} - \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}\]
  4. Applied add-sqr-sqrt0.7

    \[\leadsto \frac{2.30753 + x \cdot 0.27061000000000002}{\color{blue}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} \cdot \sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}} - \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\]
  5. Applied *-un-lft-identity0.7

    \[\leadsto \frac{\color{blue}{1 \cdot \left(2.30753 + x \cdot 0.27061000000000002\right)}}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)} \cdot \sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} - \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\]
  6. Applied times-frac0.7

    \[\leadsto \color{blue}{\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} \cdot \frac{2.30753 + x \cdot 0.27061000000000002}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}} - \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\]
  7. Applied prod-diff0.7

    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, \frac{2.30753 + x \cdot 0.27061000000000002}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}}, -\sqrt[3]{x} \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right) + \mathsf{fma}\left(-\sqrt[3]{x}, \sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x} \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right)}\]
  8. Simplified0.1

    \[\leadsto \color{blue}{\left(\frac{\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} \cdot \mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} - x\right)} + \mathsf{fma}\left(-\sqrt[3]{x}, \sqrt[3]{x} \cdot \sqrt[3]{x}, \sqrt[3]{x} \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right)\]
  9. Simplified0.1

    \[\leadsto \left(\frac{\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} \cdot \mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} - x\right) + \color{blue}{\mathsf{fma}\left(-x, 1, x\right)}\]
  10. Final simplification0.1

    \[\leadsto \left(\frac{\frac{1}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} \cdot \mathsf{fma}\left(0.27061000000000002, x, 2.30753\right)}{\sqrt{1 + x \cdot \left(0.992290000000000005 + x \cdot 0.044810000000000003\right)}} - x\right) + \mathsf{fma}\left(-x, 1, x\right)\]

Reproduce

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