\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\begin{array}{l}
\mathbf{if}\;\frac{1}{x} \le -7.3367478733049452 \cdot 10^{72}:\\
\;\;\;\;\frac{\frac{1}{y}}{\frac{x}{\frac{1}{1 + z \cdot z}}}\\
\mathbf{elif}\;\frac{1}{x} \le 1.1331728543600819 \cdot 10^{81}:\\
\;\;\;\;\frac{\frac{\frac{1}{y}}{x}}{1 + z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{\frac{1}{x}}{1 + z \cdot z}\\
\end{array}double code(double x, double y, double z) {
return ((double) (((double) (1.0 / x)) / ((double) (y * ((double) (1.0 + ((double) (z * z))))))));
}
double code(double x, double y, double z) {
double VAR;
if ((((double) (1.0 / x)) <= -7.336747873304945e+72)) {
VAR = ((double) (((double) (1.0 / y)) / ((double) (x / ((double) (1.0 / ((double) (1.0 + ((double) (z * z))))))))));
} else {
double VAR_1;
if ((((double) (1.0 / x)) <= 1.133172854360082e+81)) {
VAR_1 = ((double) (((double) (((double) (1.0 / y)) / x)) / ((double) (1.0 + ((double) (z * z))))));
} else {
VAR_1 = ((double) (((double) (1.0 / y)) * ((double) (((double) (1.0 / x)) / ((double) (1.0 + ((double) (z * z))))))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.7 |
|---|---|
| Target | 6.0 |
| Herbie | 5.5 |
if (/ 1.0 x) < -7.3367478733049452e72Initial program 15.6
rmApplied div-inv15.6
Applied associate-/l*15.7
Simplified15.6
rmApplied associate-/r*15.6
rmApplied *-un-lft-identity15.6
Applied times-frac15.2
Applied associate-/l*11.6
if -7.3367478733049452e72 < (/ 1.0 x) < 1.1331728543600819e81Initial program 2.4
rmApplied associate-/r*2.4
Simplified2.4
if 1.1331728543600819e81 < (/ 1.0 x) Initial program 15.6
rmApplied *-un-lft-identity15.6
Applied *-un-lft-identity15.6
Applied times-frac15.6
Applied times-frac12.2
Simplified12.2
Final simplification5.5
herbie shell --seed 2020162
(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)))))