\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}1 \cdot \frac{\frac{\frac{1}{x}}{\sqrt{1 + z \cdot z} \cdot y}}{\sqrt{1 + z \cdot z}}double f(double x, double y, double z) {
double r245889 = 1.0;
double r245890 = x;
double r245891 = r245889 / r245890;
double r245892 = y;
double r245893 = z;
double r245894 = r245893 * r245893;
double r245895 = r245889 + r245894;
double r245896 = r245892 * r245895;
double r245897 = r245891 / r245896;
return r245897;
}
double f(double x, double y, double z) {
double r245898 = 1.0;
double r245899 = 1.0;
double r245900 = x;
double r245901 = r245899 / r245900;
double r245902 = z;
double r245903 = r245902 * r245902;
double r245904 = r245898 + r245903;
double r245905 = sqrt(r245904);
double r245906 = y;
double r245907 = r245905 * r245906;
double r245908 = r245901 / r245907;
double r245909 = r245908 / r245905;
double r245910 = r245898 * r245909;
return r245910;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.4 |
|---|---|
| Target | 5.8 |
| Herbie | 6.2 |
Initial program 6.4
rmApplied *-un-lft-identity6.4
Applied add-sqr-sqrt6.4
Applied times-frac6.4
Applied times-frac6.4
Simplified6.4
rmApplied add-sqr-sqrt6.4
Applied div-inv6.4
Applied times-frac6.4
Applied associate-*r*6.0
Simplified6.0
rmApplied *-un-lft-identity6.0
Applied div-inv6.0
Applied times-frac6.0
Applied associate-*l*6.0
Simplified6.2
Final simplification6.2
herbie shell --seed 2019326
(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)))))