\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\frac{\sqrt[3]{\frac{1}{y}}}{\frac{\sqrt{1 + z \cdot z}}{\sqrt[3]{\frac{1}{y}}}} \cdot \frac{\frac{\sqrt[3]{\frac{1}{y}}}{\sqrt{1 + z \cdot z}}}{x}double f(double x, double y, double z) {
double r288231 = 1.0;
double r288232 = x;
double r288233 = r288231 / r288232;
double r288234 = y;
double r288235 = z;
double r288236 = r288235 * r288235;
double r288237 = r288231 + r288236;
double r288238 = r288234 * r288237;
double r288239 = r288233 / r288238;
return r288239;
}
double f(double x, double y, double z) {
double r288240 = 1.0;
double r288241 = y;
double r288242 = r288240 / r288241;
double r288243 = cbrt(r288242);
double r288244 = z;
double r288245 = r288244 * r288244;
double r288246 = r288240 + r288245;
double r288247 = sqrt(r288246);
double r288248 = r288247 / r288243;
double r288249 = r288243 / r288248;
double r288250 = r288243 / r288247;
double r288251 = x;
double r288252 = r288250 / r288251;
double r288253 = r288249 * r288252;
return r288253;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.7 |
|---|---|
| Target | 6.1 |
| Herbie | 6.0 |
Initial program 6.7
rmApplied associate-/r*6.9
Simplified6.9
rmApplied add-sqr-sqrt6.9
Applied div-inv6.9
Applied times-frac6.2
rmApplied pow16.2
Applied pow16.2
Applied pow-prod-down6.2
Simplified6.2
rmApplied *-un-lft-identity6.2
Applied sqrt-prod6.2
Applied add-cube-cbrt6.8
Applied times-frac6.8
Applied times-frac6.0
Simplified6.0
Final simplification6.0
herbie shell --seed 2020046 +o rules:numerics
(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)))))