\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\begin{array}{l}
\mathbf{if}\;x \le -3.063324637959538229342771347897190184734 \cdot 10^{-99}:\\
\;\;\;\;\frac{1}{x \cdot \left(1 \cdot y + \left(z \cdot y\right) \cdot z\right)}\\
\mathbf{elif}\;x \le 7.55716549245786398018609449977741732329 \cdot 10^{-59}:\\
\;\;\;\;\frac{1}{y \cdot \left(\left(x \cdot z\right) \cdot z + 1 \cdot x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{x}}{1 \cdot y + \left(z \cdot y\right) \cdot z}\\
\end{array}double f(double x, double y, double z) {
double r183038 = 1.0;
double r183039 = x;
double r183040 = r183038 / r183039;
double r183041 = y;
double r183042 = z;
double r183043 = r183042 * r183042;
double r183044 = r183038 + r183043;
double r183045 = r183041 * r183044;
double r183046 = r183040 / r183045;
return r183046;
}
double f(double x, double y, double z) {
double r183047 = x;
double r183048 = -3.0633246379595382e-99;
bool r183049 = r183047 <= r183048;
double r183050 = 1.0;
double r183051 = y;
double r183052 = r183050 * r183051;
double r183053 = z;
double r183054 = r183053 * r183051;
double r183055 = r183054 * r183053;
double r183056 = r183052 + r183055;
double r183057 = r183047 * r183056;
double r183058 = r183050 / r183057;
double r183059 = 7.557165492457864e-59;
bool r183060 = r183047 <= r183059;
double r183061 = r183047 * r183053;
double r183062 = r183061 * r183053;
double r183063 = r183050 * r183047;
double r183064 = r183062 + r183063;
double r183065 = r183051 * r183064;
double r183066 = r183050 / r183065;
double r183067 = r183050 / r183047;
double r183068 = r183067 / r183056;
double r183069 = r183060 ? r183066 : r183068;
double r183070 = r183049 ? r183058 : r183069;
return r183070;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.5 |
|---|---|
| Target | 5.7 |
| Herbie | 1.6 |
if x < -3.0633246379595382e-99Initial program 2.6
Taylor expanded around inf 2.6
Simplified2.6
rmApplied distribute-lft-in2.6
Simplified1.0
Simplified1.0
rmApplied div-inv1.0
Applied associate-/l*1.4
Simplified2.8
rmApplied distribute-lft-in2.8
Simplified1.3
if -3.0633246379595382e-99 < x < 7.557165492457864e-59Initial program 14.4
Taylor expanded around inf 14.4
Simplified14.4
rmApplied distribute-lft-in14.4
Simplified10.0
Simplified10.0
rmApplied div-inv10.0
Applied associate-/l*10.0
Simplified14.4
Taylor expanded around inf 14.4
Simplified2.9
if 7.557165492457864e-59 < x Initial program 2.4
Taylor expanded around inf 2.4
Simplified2.4
rmApplied distribute-lft-in2.4
Simplified0.5
Simplified0.5
Final simplification1.6
herbie shell --seed 2019179
(FPCore (x y z)
:name "Statistics.Distribution.CauchyLorentz:$cdensity from math-functions-0.1.5.2"
:herbie-target
(if (< (* y (+ 1.0 (* z z))) -inf.0) (/ (/ 1.0 y) (* (+ 1.0 (* z z)) x)) (if (< (* y (+ 1.0 (* z z))) 8.680743250567252e+305) (/ (/ 1.0 x) (* (+ 1.0 (* z z)) y)) (/ (/ 1.0 y) (* (+ 1.0 (* z z)) x))))
(/ (/ 1.0 x) (* y (+ 1.0 (* z z)))))