\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}\frac{\sqrt[3]{1}}{\frac{\sqrt{1 + z \cdot z}}{\sqrt[3]{1}}} \cdot \frac{\frac{\sqrt[3]{1}}{y}}{\sqrt{1 + z \cdot z} \cdot x}double f(double x, double y, double z) {
double r392718 = 1.0;
double r392719 = x;
double r392720 = r392718 / r392719;
double r392721 = y;
double r392722 = z;
double r392723 = r392722 * r392722;
double r392724 = r392718 + r392723;
double r392725 = r392721 * r392724;
double r392726 = r392720 / r392725;
return r392726;
}
double f(double x, double y, double z) {
double r392727 = 1.0;
double r392728 = cbrt(r392727);
double r392729 = z;
double r392730 = r392729 * r392729;
double r392731 = r392727 + r392730;
double r392732 = sqrt(r392731);
double r392733 = r392732 / r392728;
double r392734 = r392728 / r392733;
double r392735 = y;
double r392736 = r392728 / r392735;
double r392737 = x;
double r392738 = r392732 * r392737;
double r392739 = r392736 / r392738;
double r392740 = r392734 * r392739;
return r392740;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.4 |
|---|---|
| Target | 5.8 |
| Herbie | 6.3 |
Initial program 6.4
rmApplied associate-/r*6.5
Simplified6.5
rmApplied add-sqr-sqrt6.5
Applied *-un-lft-identity6.5
Applied *-un-lft-identity6.5
Applied add-cube-cbrt6.5
Applied times-frac6.5
Applied times-frac6.5
Applied times-frac6.5
Simplified6.5
rmApplied associate-/l/6.3
Final simplification6.3
herbie shell --seed 2020083
(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)))))