\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\begin{array}{l}
\mathbf{if}\;x \le -64215.4250714361915 \lor \neg \left(x \le 1.5982897855907784 \cdot 10^{256}\right):\\
\;\;\;\;\frac{\frac{\frac{1}{y}}{x}}{1 + z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{1}{\left(1 + z \cdot z\right) \cdot x}\\
\end{array}double code(double x, double y, double z) {
return ((1.0 / x) / (y * (1.0 + (z * z))));
}
double code(double x, double y, double z) {
double VAR;
if (((x <= -64215.42507143619) || !(x <= 1.5982897855907784e+256))) {
VAR = (((1.0 / y) / x) / (1.0 + (z * z)));
} else {
VAR = ((1.0 / y) * (1.0 / ((1.0 + (z * z)) * x)));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.4 |
|---|---|
| Target | 5.7 |
| Herbie | 5.4 |
if x < -64215.42507143619 or 1.5982897855907784e+256 < x Initial program 1.4
rmApplied associate-/r*1.4
Simplified1.4
if -64215.42507143619 < x < 1.5982897855907784e+256Initial program 8.7
rmApplied *-un-lft-identity8.7
Applied *-un-lft-identity8.7
Applied times-frac8.7
Applied times-frac7.2
Simplified7.2
rmApplied div-inv7.2
Applied associate-/l*7.3
Simplified7.3
Final simplification5.4
herbie shell --seed 2020100
(FPCore (x y z)
:name "Statistics.Distribution.CauchyLorentz:$cdensity from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< (* y (+ 1 (* z z))) #f) (/ (/ 1 y) (* (+ 1 (* z z)) x)) (if (< (* y (+ 1 (* z z))) 8.680743250567252e+305) (/ (/ 1 x) (* (+ 1 (* z z)) y)) (/ (/ 1 y) (* (+ 1 (* z z)) x))))
(/ (/ 1 x) (* y (+ 1 (* z z)))))