\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -4.3158631499511532 \cdot 10^{165} \lor \neg \left(x \cdot y \le 3.9488629761066596 \cdot 10^{53}\right):\\
\;\;\;\;\frac{x}{z} \cdot \frac{1}{\left(z + 1\right) \cdot \frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot \left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{y}}{z}\right)\right) \cdot \frac{\sqrt[3]{y}}{z \cdot \left(z + 1\right)}\\
\end{array}double code(double x, double y, double z) {
return ((double) (((double) (x * y)) / ((double) (((double) (z * z)) * ((double) (z + 1.0))))));
}
double code(double x, double y, double z) {
double VAR;
if (((((double) (x * y)) <= -4.315863149951153e+165) || !(((double) (x * y)) <= 3.9488629761066596e+53))) {
VAR = ((double) (((double) (x / z)) * ((double) (1.0 / ((double) (((double) (z + 1.0)) * ((double) (z / y))))))));
} else {
VAR = ((double) (((double) (x * ((double) (((double) cbrt(y)) * ((double) (((double) cbrt(y)) / z)))))) * ((double) (((double) cbrt(y)) / ((double) (z * ((double) (z + 1.0))))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.8 |
|---|---|
| Target | 4.0 |
| Herbie | 1.4 |
if (* x y) < -4.3158631499511532e165 or 3.9488629761066596e53 < (* x y) Initial program 25.8
Simplified18.0
rmApplied *-un-lft-identity18.0
Applied times-frac11.7
Applied associate-*r*9.2
Simplified9.1
rmApplied clear-num9.2
Simplified2.9
if -4.3158631499511532e165 < (* x y) < 3.9488629761066596e53Initial program 11.1
Simplified12.3
rmApplied add-cube-cbrt12.6
Applied times-frac7.7
Applied associate-*r*0.9
Simplified1.0
Final simplification1.4
herbie shell --seed 2020179
(FPCore (x y z)
:name "Statistics.Distribution.Beta:$cvariance from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< z 249.6182814532307) (/ (* y (/ x z)) (+ z (* z z))) (/ (* (/ (/ y z) (+ 1.0 z)) x) z))
(/ (* x y) (* (* z z) (+ z 1.0))))