\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\frac{\frac{\frac{1}{\sqrt{1 + z \cdot z} \cdot x}}{y}}{\sqrt{1 + z \cdot z}}double f(double x, double y, double z) {
double r353269 = 1.0;
double r353270 = x;
double r353271 = r353269 / r353270;
double r353272 = y;
double r353273 = z;
double r353274 = r353273 * r353273;
double r353275 = r353269 + r353274;
double r353276 = r353272 * r353275;
double r353277 = r353271 / r353276;
return r353277;
}
double f(double x, double y, double z) {
double r353278 = 1.0;
double r353279 = z;
double r353280 = r353279 * r353279;
double r353281 = r353278 + r353280;
double r353282 = sqrt(r353281);
double r353283 = x;
double r353284 = r353282 * r353283;
double r353285 = r353278 / r353284;
double r353286 = y;
double r353287 = r353285 / r353286;
double r353288 = r353287 / r353282;
return r353288;
}




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 *-un-lft-identity6.4
Applied *-un-lft-identity6.4
Applied sqrt-prod6.4
Applied times-frac6.4
Applied times-frac6.4
Applied associate-*r*6.0
Simplified6.0
rmApplied pow16.0
Applied pow16.0
Applied pow-prod-down6.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)))))