Average Error: 25.5 → 0.7
Time: 26.0s
Precision: 64
\[\frac{\left(x - 2.0\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}\]
\[\begin{array}{l} \mathbf{if}\;x \le -2.447941498404213 \cdot 10^{+65}:\\ \;\;\;\;\mathsf{fma}\left(4.16438922228, x, \frac{\frac{y}{x}}{x}\right) - 110.1139242984811\\ \mathbf{elif}\;x \le 9.776865012149899 \cdot 10^{+58}:\\ \;\;\;\;\left(\frac{\frac{1}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}} \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)\right) \cdot \frac{\frac{x - 2.0}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(4.16438922228, x, \frac{\frac{y}{x}}{x}\right) - 110.1139242984811\\ \end{array}\]
\frac{\left(x - 2.0\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\begin{array}{l}
\mathbf{if}\;x \le -2.447941498404213 \cdot 10^{+65}:\\
\;\;\;\;\mathsf{fma}\left(4.16438922228, x, \frac{\frac{y}{x}}{x}\right) - 110.1139242984811\\

\mathbf{elif}\;x \le 9.776865012149899 \cdot 10^{+58}:\\
\;\;\;\;\left(\frac{\frac{1}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}} \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)\right) \cdot \frac{\frac{x - 2.0}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(4.16438922228, x, \frac{\frac{y}{x}}{x}\right) - 110.1139242984811\\

\end{array}
double f(double x, double y, double z) {
        double r18316399 = x;
        double r18316400 = 2.0;
        double r18316401 = r18316399 - r18316400;
        double r18316402 = 4.16438922228;
        double r18316403 = r18316399 * r18316402;
        double r18316404 = 78.6994924154;
        double r18316405 = r18316403 + r18316404;
        double r18316406 = r18316405 * r18316399;
        double r18316407 = 137.519416416;
        double r18316408 = r18316406 + r18316407;
        double r18316409 = r18316408 * r18316399;
        double r18316410 = y;
        double r18316411 = r18316409 + r18316410;
        double r18316412 = r18316411 * r18316399;
        double r18316413 = z;
        double r18316414 = r18316412 + r18316413;
        double r18316415 = r18316401 * r18316414;
        double r18316416 = 43.3400022514;
        double r18316417 = r18316399 + r18316416;
        double r18316418 = r18316417 * r18316399;
        double r18316419 = 263.505074721;
        double r18316420 = r18316418 + r18316419;
        double r18316421 = r18316420 * r18316399;
        double r18316422 = 313.399215894;
        double r18316423 = r18316421 + r18316422;
        double r18316424 = r18316423 * r18316399;
        double r18316425 = 47.066876606;
        double r18316426 = r18316424 + r18316425;
        double r18316427 = r18316415 / r18316426;
        return r18316427;
}

double f(double x, double y, double z) {
        double r18316428 = x;
        double r18316429 = -2.447941498404213e+65;
        bool r18316430 = r18316428 <= r18316429;
        double r18316431 = 4.16438922228;
        double r18316432 = y;
        double r18316433 = r18316432 / r18316428;
        double r18316434 = r18316433 / r18316428;
        double r18316435 = fma(r18316431, r18316428, r18316434);
        double r18316436 = 110.1139242984811;
        double r18316437 = r18316435 - r18316436;
        double r18316438 = 9.776865012149899e+58;
        bool r18316439 = r18316428 <= r18316438;
        double r18316440 = 1.0;
        double r18316441 = 43.3400022514;
        double r18316442 = r18316441 + r18316428;
        double r18316443 = 263.505074721;
        double r18316444 = fma(r18316442, r18316428, r18316443);
        double r18316445 = 313.399215894;
        double r18316446 = fma(r18316444, r18316428, r18316445);
        double r18316447 = 47.066876606;
        double r18316448 = fma(r18316428, r18316446, r18316447);
        double r18316449 = sqrt(r18316448);
        double r18316450 = sqrt(r18316449);
        double r18316451 = r18316440 / r18316450;
        double r18316452 = r18316451 / r18316450;
        double r18316453 = 78.6994924154;
        double r18316454 = fma(r18316428, r18316431, r18316453);
        double r18316455 = 137.519416416;
        double r18316456 = fma(r18316428, r18316454, r18316455);
        double r18316457 = fma(r18316428, r18316456, r18316432);
        double r18316458 = z;
        double r18316459 = fma(r18316428, r18316457, r18316458);
        double r18316460 = r18316452 * r18316459;
        double r18316461 = 2.0;
        double r18316462 = r18316428 - r18316461;
        double r18316463 = r18316462 / r18316450;
        double r18316464 = r18316463 / r18316450;
        double r18316465 = r18316460 * r18316464;
        double r18316466 = r18316439 ? r18316465 : r18316437;
        double r18316467 = r18316430 ? r18316437 : r18316466;
        return r18316467;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Target

Original25.5
Target0.5
Herbie0.7
\[\begin{array}{l} \mathbf{if}\;x \lt -3.326128725870005 \cdot 10^{+62}:\\ \;\;\;\;\left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\ \mathbf{elif}\;x \lt 9.429991714554673 \cdot 10^{+55}:\\ \;\;\;\;\frac{x - 2.0}{1} \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(263.505074721 \cdot x + \left(43.3400022514 \cdot \left(x \cdot x\right) + x \cdot \left(x \cdot x\right)\right)\right) + 313.399215894\right) \cdot x + 47.066876606}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\ \end{array}\]

Derivation

  1. Split input into 2 regimes
  2. if x < -2.447941498404213e+65 or 9.776865012149899e+58 < x

    1. Initial program 61.7

      \[\frac{\left(x - 2.0\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}\]
    2. Simplified58.5

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{x - 2.0}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}}\]
    3. Taylor expanded around 0 58.5

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{78.6994924154 \cdot x + \left(4.16438922228 \cdot {x}^{2} + 137.519416416\right)}, y\right), z\right) \cdot \frac{x - 2.0}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}\]
    4. Simplified58.5

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \color{blue}{x \cdot \mathsf{fma}\left(4.16438922228, x, 78.6994924154\right) + 137.519416416}, y\right), z\right) \cdot \frac{x - 2.0}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}\]
    5. Taylor expanded around inf 0.1

      \[\leadsto \color{blue}{\left(\frac{y}{{x}^{2}} + 4.16438922228 \cdot x\right) - 110.1139242984811}\]
    6. Simplified0.1

      \[\leadsto \color{blue}{\mathsf{fma}\left(4.16438922228, x, \frac{\frac{y}{x}}{x}\right) - 110.1139242984811}\]

    if -2.447941498404213e+65 < x < 9.776865012149899e+58

    1. Initial program 2.0

      \[\frac{\left(x - 2.0\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}\]
    2. Simplified1.0

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{x - 2.0}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}}\]
    3. Using strategy rm
    4. Applied add-sqr-sqrt1.2

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{x - 2.0}{\color{blue}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)} \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}}}\]
    5. Applied *-un-lft-identity1.2

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{\color{blue}{1 \cdot \left(x - 2.0\right)}}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)} \cdot \sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}}\]
    6. Applied times-frac1.2

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \color{blue}{\left(\frac{1}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}} \cdot \frac{x - 2.0}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}}\right)}\]
    7. Applied associate-*r*1.1

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{1}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}}\right) \cdot \frac{x - 2.0}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}}}\]
    8. Using strategy rm
    9. Applied associate-*l*1.2

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \left(\frac{1}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}} \cdot \frac{x - 2.0}{\sqrt{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), x, 47.066876606\right)}}\right)}\]
    10. Simplified1.2

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \color{blue}{\frac{\frac{x - 2.0}{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}\]
    11. Using strategy rm
    12. Applied add-sqr-sqrt1.2

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{\frac{x - 2.0}{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}{\sqrt{\color{blue}{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)} \cdot \sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}\]
    13. Applied sqrt-prod1.2

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{\frac{x - 2.0}{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}{\color{blue}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}\]
    14. Applied add-sqr-sqrt1.2

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{\frac{x - 2.0}{\sqrt{\color{blue}{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)} \cdot \sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}\]
    15. Applied sqrt-prod1.9

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{\frac{x - 2.0}{\color{blue}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}\]
    16. Applied *-un-lft-identity1.9

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{\frac{\color{blue}{1 \cdot \left(x - 2.0\right)}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}\]
    17. Applied times-frac1.2

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{\color{blue}{\frac{1}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}} \cdot \frac{x - 2.0}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}} \cdot \sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}\]
    18. Applied times-frac1.3

      \[\leadsto \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \color{blue}{\left(\frac{\frac{1}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}} \cdot \frac{\frac{x - 2.0}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}\right)}\]
    19. Applied associate-*r*1.1

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right) \cdot \frac{\frac{1}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}\right) \cdot \frac{\frac{x - 2.0}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(x + 43.3400022514, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -2.447941498404213 \cdot 10^{+65}:\\ \;\;\;\;\mathsf{fma}\left(4.16438922228, x, \frac{\frac{y}{x}}{x}\right) - 110.1139242984811\\ \mathbf{elif}\;x \le 9.776865012149899 \cdot 10^{+58}:\\ \;\;\;\;\left(\frac{\frac{1}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}} \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)\right) \cdot \frac{\frac{x - 2.0}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}}{\sqrt{\sqrt{\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(43.3400022514 + x, x, 263.505074721\right), x, 313.399215894\right), 47.066876606\right)}}}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(4.16438922228, x, \frac{\frac{y}{x}}{x}\right) - 110.1139242984811\\ \end{array}\]

Reproduce

herbie shell --seed 2019164 +o rules:numerics
(FPCore (x y z)
  :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"

  :herbie-target
  (if (< x -3.326128725870005e+62) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811) (if (< x 9.429991714554673e+55) (* (/ (- x 2.0) 1) (/ (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z) (+ (* (+ (+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x)))) 313.399215894) x) 47.066876606))) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))

  (/ (* (- x 2.0) (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z)) (+ (* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x) 47.066876606)))