x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}\begin{array}{l}
\mathbf{if}\;z \le -89.314397502000162:\\
\;\;\;\;x - \frac{1}{\frac{t}{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}}\\
\mathbf{else}:\\
\;\;\;\;x - \left(1 \cdot \left(\left(\sqrt[3]{\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}}} \cdot \left(\left(\sqrt[3]{\sqrt[3]{\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}} \cdot \sqrt[3]{\sqrt[3]{\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}}\right) \cdot \sqrt[3]{\sqrt[3]{\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}}}}\right)\right) \cdot \left(\sqrt[3]{\frac{z}{\sqrt[3]{t} \cdot \sqrt[3]{t}}} \cdot \frac{y}{\sqrt[3]{t}}\right)\right) + \left(\frac{\log 1}{t} + 0.5 \cdot \frac{{z}^{2} \cdot y}{t}\right)\right)\\
\end{array}double code(double x, double y, double z, double t) {
return (x - (log(((1.0 - y) + (y * exp(z)))) / t));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((z <= -89.31439750200016)) {
VAR = (x - (1.0 / (t / log(((1.0 - y) + (y * exp(z)))))));
} else {
VAR = (x - ((1.0 * ((cbrt((z / (cbrt(t) * cbrt(t)))) * ((cbrt(cbrt((z / (cbrt(t) * cbrt(t))))) * cbrt(cbrt((z / (cbrt(t) * cbrt(t)))))) * cbrt(cbrt((z / (cbrt(t) * cbrt(t))))))) * (cbrt((z / (cbrt(t) * cbrt(t)))) * (y / cbrt(t))))) + ((log(1.0) / t) + (0.5 * ((pow(z, 2.0) * y) / t)))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 25.0 |
|---|---|
| Target | 16.5 |
| Herbie | 8.3 |
if z < -89.31439750200016Initial program 11.7
rmApplied clear-num11.7
if -89.31439750200016 < z Initial program 31.0
Taylor expanded around 0 7.1
rmApplied add-cube-cbrt7.3
Applied times-frac6.8
rmApplied add-cube-cbrt6.8
Applied associate-*l*6.8
rmApplied add-cube-cbrt6.8
Final simplification8.3
herbie shell --seed 2020103
(FPCore (x y z t)
:name "System.Random.MWC.Distributions:truncatedExp from mwc-random-0.13.3.2"
:precision binary64
:herbie-target
(if (< z -2.8874623088207947e+119) (- (- x (/ (/ (- 0.5) (* y t)) (* z z))) (* (/ (- 0.5) (* y t)) (/ (/ 2 z) (* z z)))) (- x (/ (log (+ 1 (* z y))) t)))
(- x (/ (log (+ (- 1 y) (* y (exp z)))) t)))