\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 7.785649327947097 \cdot 10^{+159}:\\
\;\;\;\;\frac{\frac{\frac{1}{x}}{z \cdot z + 1}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot \left(z \cdot \left(z \cdot y\right)\right)} - \frac{1}{x \cdot \left(y \cdot {z}^{4}\right)}\\
\end{array}double code(double x, double y, double z) {
return ((1.0 / x) / ((double) (y * ((double) (1.0 + ((double) (z * z)))))));
}
double code(double x, double y, double z) {
double VAR;
if ((((double) (z * z)) <= 7.785649327947097e+159)) {
VAR = (((1.0 / x) / ((double) (((double) (z * z)) + 1.0))) / y);
} else {
VAR = ((double) ((1.0 / ((double) (x * ((double) (z * ((double) (z * y))))))) - (1.0 / ((double) (x * ((double) (y * ((double) pow(z, 4.0)))))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.5 |
|---|---|
| Target | 5.7 |
| Herbie | 3.7 |
if (* z z) < 7.78564932794709679e159Initial program 1.0
rmApplied add-cube-cbrt1.9
Applied times-frac1.4
Simplified1.4
rmApplied associate-*r/1.4
Applied associate-*l/1.8
Simplified0.9
if 7.78564932794709679e159 < (* z z) Initial program 14.5
rmApplied add-cube-cbrt14.6
Applied times-frac14.3
Simplified14.3
rmApplied associate-*r/14.3
Applied associate-*l/14.1
Simplified13.9
Taylor expanded around inf 14.6
Simplified7.9
Final simplification3.7
herbie shell --seed 2020196
(FPCore (x y z)
:name "Statistics.Distribution.CauchyLorentz:$cdensity from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< (* y (+ 1.0 (* z z))) (- INFINITY)) (/ (/ 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)))))