Average Error: 24.1 → 8.2
Time: 50.3s
Precision: 64
\[x - \frac{\log \left(\left(1.0 - y\right) + y \cdot e^{z}\right)}{t}\]
\[\begin{array}{l} \mathbf{if}\;z \le -1.4203884136029791 \cdot 10^{-18}:\\ \;\;\;\;x - \frac{\left(\log \left(\sqrt{{\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\frac{2}{3}}}\right) + \log \left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right) \cdot \frac{1}{6}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\\ \mathbf{elif}\;z \le 1.8362327647799437 \cdot 10^{-96}:\\ \;\;\;\;x - \mathsf{fma}\left(\frac{\log \left(\sqrt{1.0}\right)}{t}, 2, \mathsf{fma}\left(\frac{z}{t}, \frac{y}{1.0}, \left(\frac{1}{2} \cdot \frac{z \cdot z}{t}\right) \cdot \frac{y}{1.0}\right)\right)\\ \mathbf{elif}\;z \le 3.023041139807338 \cdot 10^{-37}:\\ \;\;\;\;x - \frac{\sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)} \cdot \sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}{\frac{t}{\sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(z, 0.5, 1.0\right) \cdot z, \log 1.0\right)}{t}\\ \end{array}\]
x - \frac{\log \left(\left(1.0 - y\right) + y \cdot e^{z}\right)}{t}
\begin{array}{l}
\mathbf{if}\;z \le -1.4203884136029791 \cdot 10^{-18}:\\
\;\;\;\;x - \frac{\left(\log \left(\sqrt{{\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\frac{2}{3}}}\right) + \log \left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right) \cdot \frac{1}{6}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\\

\mathbf{elif}\;z \le 1.8362327647799437 \cdot 10^{-96}:\\
\;\;\;\;x - \mathsf{fma}\left(\frac{\log \left(\sqrt{1.0}\right)}{t}, 2, \mathsf{fma}\left(\frac{z}{t}, \frac{y}{1.0}, \left(\frac{1}{2} \cdot \frac{z \cdot z}{t}\right) \cdot \frac{y}{1.0}\right)\right)\\

\mathbf{elif}\;z \le 3.023041139807338 \cdot 10^{-37}:\\
\;\;\;\;x - \frac{\sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)} \cdot \sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}{\frac{t}{\sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}}\\

\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(z, 0.5, 1.0\right) \cdot z, \log 1.0\right)}{t}\\

\end{array}
double f(double x, double y, double z, double t) {
        double r14700467 = x;
        double r14700468 = 1.0;
        double r14700469 = y;
        double r14700470 = r14700468 - r14700469;
        double r14700471 = z;
        double r14700472 = exp(r14700471);
        double r14700473 = r14700469 * r14700472;
        double r14700474 = r14700470 + r14700473;
        double r14700475 = log(r14700474);
        double r14700476 = t;
        double r14700477 = r14700475 / r14700476;
        double r14700478 = r14700467 - r14700477;
        return r14700478;
}

double f(double x, double y, double z, double t) {
        double r14700479 = z;
        double r14700480 = -1.4203884136029791e-18;
        bool r14700481 = r14700479 <= r14700480;
        double r14700482 = x;
        double r14700483 = expm1(r14700479);
        double r14700484 = y;
        double r14700485 = 1.0;
        double r14700486 = fma(r14700483, r14700484, r14700485);
        double r14700487 = 0.6666666666666666;
        double r14700488 = pow(r14700486, r14700487);
        double r14700489 = sqrt(r14700488);
        double r14700490 = log(r14700489);
        double r14700491 = log(r14700486);
        double r14700492 = 0.16666666666666666;
        double r14700493 = r14700491 * r14700492;
        double r14700494 = r14700490 + r14700493;
        double r14700495 = sqrt(r14700486);
        double r14700496 = log(r14700495);
        double r14700497 = r14700494 + r14700496;
        double r14700498 = t;
        double r14700499 = r14700497 / r14700498;
        double r14700500 = r14700482 - r14700499;
        double r14700501 = 1.8362327647799437e-96;
        bool r14700502 = r14700479 <= r14700501;
        double r14700503 = sqrt(r14700485);
        double r14700504 = log(r14700503);
        double r14700505 = r14700504 / r14700498;
        double r14700506 = 2.0;
        double r14700507 = r14700479 / r14700498;
        double r14700508 = r14700484 / r14700485;
        double r14700509 = 0.5;
        double r14700510 = r14700479 * r14700479;
        double r14700511 = r14700510 / r14700498;
        double r14700512 = r14700509 * r14700511;
        double r14700513 = r14700512 * r14700508;
        double r14700514 = fma(r14700507, r14700508, r14700513);
        double r14700515 = fma(r14700505, r14700506, r14700514);
        double r14700516 = r14700482 - r14700515;
        double r14700517 = 3.023041139807338e-37;
        bool r14700518 = r14700479 <= r14700517;
        double r14700519 = r14700496 + r14700496;
        double r14700520 = cbrt(r14700519);
        double r14700521 = r14700520 * r14700520;
        double r14700522 = r14700498 / r14700520;
        double r14700523 = r14700521 / r14700522;
        double r14700524 = r14700482 - r14700523;
        double r14700525 = 0.5;
        double r14700526 = fma(r14700479, r14700525, r14700485);
        double r14700527 = r14700526 * r14700479;
        double r14700528 = log(r14700485);
        double r14700529 = fma(r14700484, r14700527, r14700528);
        double r14700530 = r14700529 / r14700498;
        double r14700531 = r14700482 - r14700530;
        double r14700532 = r14700518 ? r14700524 : r14700531;
        double r14700533 = r14700502 ? r14700516 : r14700532;
        double r14700534 = r14700481 ? r14700500 : r14700533;
        return r14700534;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Target

Original24.1
Target16.3
Herbie8.2
\[\begin{array}{l} \mathbf{if}\;z \lt -2.8874623088207947 \cdot 10^{+119}:\\ \;\;\;\;\left(x - \frac{\frac{-0.5}{y \cdot t}}{z \cdot z}\right) - \frac{-0.5}{y \cdot t} \cdot \frac{\frac{2.0}{z}}{z \cdot z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\log \left(1.0 + z \cdot y\right)}{t}\\ \end{array}\]

Derivation

  1. Split input into 4 regimes
  2. if z < -1.4203884136029791e-18

    1. Initial program 12.1

      \[x - \frac{\log \left(\left(1.0 - y\right) + y \cdot e^{z}\right)}{t}\]
    2. Simplified11.7

      \[\leadsto \color{blue}{x - \frac{\log \left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}{t}}\]
    3. Using strategy rm
    4. Applied add-sqr-sqrt11.8

      \[\leadsto x - \frac{\log \color{blue}{\left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)} \cdot \sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}{t}\]
    5. Applied log-prod11.8

      \[\leadsto x - \frac{\color{blue}{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}{t}\]
    6. Using strategy rm
    7. Applied add-cube-cbrt11.8

      \[\leadsto x - \frac{\log \left(\sqrt{\color{blue}{\left(\sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)} \cdot \sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) \cdot \sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}}}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\]
    8. Applied sqrt-prod11.8

      \[\leadsto x - \frac{\log \color{blue}{\left(\sqrt{\sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)} \cdot \sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}} \cdot \sqrt{\sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}}\right)} + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\]
    9. Applied log-prod11.8

      \[\leadsto x - \frac{\color{blue}{\left(\log \left(\sqrt{\sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)} \cdot \sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}}\right) + \log \left(\sqrt{\sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}}\right)\right)} + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\]
    10. Using strategy rm
    11. Applied pow1/311.8

      \[\leadsto x - \frac{\left(\log \left(\sqrt{\sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)} \cdot \color{blue}{{\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\frac{1}{3}}}}\right) + \log \left(\sqrt{\sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}}\right)\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\]
    12. Applied pow1/311.8

      \[\leadsto x - \frac{\left(\log \left(\sqrt{\color{blue}{{\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\frac{1}{3}}} \cdot {\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\frac{1}{3}}}\right) + \log \left(\sqrt{\sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}}\right)\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\]
    13. Applied pow-prod-up11.8

      \[\leadsto x - \frac{\left(\log \left(\sqrt{\color{blue}{{\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\left(\frac{1}{3} + \frac{1}{3}\right)}}}\right) + \log \left(\sqrt{\sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}}\right)\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\]
    14. Simplified11.8

      \[\leadsto x - \frac{\left(\log \left(\sqrt{{\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\color{blue}{\frac{2}{3}}}}\right) + \log \left(\sqrt{\sqrt[3]{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}}\right)\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\]
    15. Using strategy rm
    16. Applied pow1/311.8

      \[\leadsto x - \frac{\left(\log \left(\sqrt{{\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\frac{2}{3}}}\right) + \log \left(\sqrt{\color{blue}{{\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\frac{1}{3}}}}\right)\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\]
    17. Applied sqrt-pow111.8

      \[\leadsto x - \frac{\left(\log \left(\sqrt{{\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\frac{2}{3}}}\right) + \log \color{blue}{\left({\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\left(\frac{\frac{1}{3}}{2}\right)}\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\]
    18. Applied log-pow11.8

      \[\leadsto x - \frac{\left(\log \left(\sqrt{{\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\frac{2}{3}}}\right) + \color{blue}{\frac{\frac{1}{3}}{2} \cdot \log \left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\]

    if -1.4203884136029791e-18 < z < 1.8362327647799437e-96

    1. Initial program 30.2

      \[x - \frac{\log \left(\left(1.0 - y\right) + y \cdot e^{z}\right)}{t}\]
    2. Simplified10.8

      \[\leadsto \color{blue}{x - \frac{\log \left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}{t}}\]
    3. Using strategy rm
    4. Applied add-sqr-sqrt10.8

      \[\leadsto x - \frac{\log \color{blue}{\left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)} \cdot \sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}{t}\]
    5. Applied log-prod10.8

      \[\leadsto x - \frac{\color{blue}{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}{t}\]
    6. Taylor expanded around 0 6.0

      \[\leadsto x - \color{blue}{\left(\frac{1}{2} \cdot \frac{{z}^{2} \cdot y}{t \cdot {\left(\sqrt{1.0}\right)}^{2}} + \left(2 \cdot \frac{\log \left(\sqrt{1.0}\right)}{t} + \frac{z \cdot y}{t \cdot {\left(\sqrt{1.0}\right)}^{2}}\right)\right)}\]
    7. Simplified5.0

      \[\leadsto x - \color{blue}{\mathsf{fma}\left(\frac{\log \left(\sqrt{1.0}\right)}{t}, 2, \mathsf{fma}\left(\frac{z}{t}, \frac{y}{1.0}, \left(\frac{1}{2} \cdot \frac{z \cdot z}{t}\right) \cdot \frac{y}{1.0}\right)\right)}\]

    if 1.8362327647799437e-96 < z < 3.023041139807338e-37

    1. Initial program 29.8

      \[x - \frac{\log \left(\left(1.0 - y\right) + y \cdot e^{z}\right)}{t}\]
    2. Simplified12.2

      \[\leadsto \color{blue}{x - \frac{\log \left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}{t}}\]
    3. Using strategy rm
    4. Applied add-sqr-sqrt12.2

      \[\leadsto x - \frac{\log \color{blue}{\left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)} \cdot \sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}{t}\]
    5. Applied log-prod12.2

      \[\leadsto x - \frac{\color{blue}{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}{t}\]
    6. Using strategy rm
    7. Applied add-cube-cbrt12.3

      \[\leadsto x - \frac{\color{blue}{\left(\sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)} \cdot \sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}\right) \cdot \sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}}{t}\]
    8. Applied associate-/l*12.3

      \[\leadsto x - \color{blue}{\frac{\sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)} \cdot \sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}{\frac{t}{\sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}}}\]

    if 3.023041139807338e-37 < z

    1. Initial program 26.2

      \[x - \frac{\log \left(\left(1.0 - y\right) + y \cdot e^{z}\right)}{t}\]
    2. Simplified16.1

      \[\leadsto \color{blue}{x - \frac{\log \left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}{t}}\]
    3. Taylor expanded around 0 17.7

      \[\leadsto x - \frac{\color{blue}{\log 1.0 + \left(1.0 \cdot \left(z \cdot y\right) + 0.5 \cdot \left({z}^{2} \cdot y\right)\right)}}{t}\]
    4. Simplified17.7

      \[\leadsto x - \frac{\color{blue}{\mathsf{fma}\left(y, z \cdot \mathsf{fma}\left(z, 0.5, 1.0\right), \log 1.0\right)}}{t}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification8.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \le -1.4203884136029791 \cdot 10^{-18}:\\ \;\;\;\;x - \frac{\left(\log \left(\sqrt{{\left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right)}^{\frac{2}{3}}}\right) + \log \left(\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)\right) \cdot \frac{1}{6}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}{t}\\ \mathbf{elif}\;z \le 1.8362327647799437 \cdot 10^{-96}:\\ \;\;\;\;x - \mathsf{fma}\left(\frac{\log \left(\sqrt{1.0}\right)}{t}, 2, \mathsf{fma}\left(\frac{z}{t}, \frac{y}{1.0}, \left(\frac{1}{2} \cdot \frac{z \cdot z}{t}\right) \cdot \frac{y}{1.0}\right)\right)\\ \mathbf{elif}\;z \le 3.023041139807338 \cdot 10^{-37}:\\ \;\;\;\;x - \frac{\sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)} \cdot \sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}{\frac{t}{\sqrt[3]{\log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right) + \log \left(\sqrt{\mathsf{fma}\left(\mathsf{expm1}\left(z\right), y, 1.0\right)}\right)}}}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{\mathsf{fma}\left(y, \mathsf{fma}\left(z, 0.5, 1.0\right) \cdot z, \log 1.0\right)}{t}\\ \end{array}\]

Reproduce

herbie shell --seed 2019162 +o rules:numerics
(FPCore (x y z t)
  :name "System.Random.MWC.Distributions:truncatedExp from mwc-random-0.13.3.2"

  :herbie-target
  (if (< z -2.8874623088207947e+119) (- (- x (/ (/ (- 0.5) (* y t)) (* z z))) (* (/ (- 0.5) (* y t)) (/ (/ 2.0 z) (* z z)))) (- x (/ (log (+ 1.0 (* z y))) t)))

  (- x (/ (log (+ (- 1.0 y) (* y (exp z)))) t)))