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)) <= 6.0408872496917e-312) || !(((double) (x * y)) <= 1.6736867795136718e+224))) {
VAR = ((double) (((double) (((double) cbrt(y)) * ((double) (((double) (((double) cbrt(y)) / z)) * ((double) (x * ((double) (((double) cbrt(((double) (((double) cbrt(y)) * ((double) cbrt(y)))))) / z)))))))) * ((double) (((double) cbrt(((double) cbrt(y)))) / ((double) (z + 1.0))))));
} else {
VAR = ((double) (((double) (((double) (x * y)) / ((double) (z * ((double) (z + 1.0)))))) / z));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.0 |
|---|---|
| Target | 4.2 |
| Herbie | 1.8 |
if (* x y) < 6.04088724969169e-312 or 1.67368677951367175e224 < (* x y) Initial program 18.9
Simplified14.9
rmApplied add-cube-cbrt15.2
Applied times-frac9.6
Applied associate-*r*4.5
Simplified4.5
rmApplied add-cube-cbrt4.5
Applied cbrt-prod4.6
Applied times-frac3.0
Applied associate-*r*1.9
Simplified2.5
if 6.04088724969169e-312 < (* x y) < 1.67368677951367175e224Initial program 7.7
Simplified11.5
rmApplied add-cube-cbrt11.9
Applied times-frac8.2
Applied associate-*r*1.0
Simplified1.0
rmApplied associate-*r/1.0
Applied associate-*l/0.9
Applied associate-*l/0.9
Simplified0.3
Final simplification1.8
herbie shell --seed 2020190
(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))))