\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\begin{array}{l}
\mathbf{if}\;y \le -5958558.0476346109 \lor \neg \left(y \le 6.9059734859655198 \cdot 10^{-41}\right):\\
\;\;\;\;\frac{\frac{\frac{1}{y}}{x}}{1 + z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left(y \cdot \left(1 + z \cdot z\right)\right) \cdot x}\\
\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 (((y <= -5958558.047634611) || !(y <= 6.90597348596552e-41))) {
VAR = ((double) (((double) (((double) (1.0 / y)) / x)) / ((double) (1.0 + ((double) (z * z))))));
} else {
VAR = ((double) (1.0 / ((double) (((double) (y * ((double) (1.0 + ((double) (z * z)))))) * x))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.4 |
|---|---|
| Target | 5.8 |
| Herbie | 5.1 |
if y < -5958558.047634611 or 6.90597348596552e-41 < y Initial program 3.9
rmApplied associate-/r*1.5
Simplified1.5
if -5958558.047634611 < y < 6.90597348596552e-41Initial program 9.8
rmApplied div-inv9.8
Applied associate-/l*10.0
Simplified9.9
Final simplification5.1
herbie shell --seed 2020122
(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)))))