\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}\left(\left(\sqrt[3]{y} \cdot \frac{\sqrt[3]{-1} \cdot \sqrt[3]{\frac{1}{\frac{-1}{y}}}}{z}\right) \cdot x\right) \cdot \frac{\frac{\sqrt[3]{y}}{z}}{z + 1}(FPCore (x y z) :precision binary64 (/ (* x y) (* (* z z) (+ z 1.0))))
(FPCore (x y z) :precision binary64 (* (* (* (cbrt y) (/ (* (cbrt -1.0) (cbrt (/ 1.0 (/ -1.0 y)))) z)) x) (/ (/ (cbrt y) z) (+ z 1.0))))
double code(double x, double y, double z) {
return (((double) (x * y)) / ((double) (((double) (z * z)) * ((double) (z + 1.0)))));
}
double code(double x, double y, double z) {
return ((double) (((double) (((double) (((double) cbrt(y)) * (((double) (((double) cbrt(-1.0)) * ((double) cbrt((1.0 / (-1.0 / y)))))) / z))) * x)) * ((((double) cbrt(y)) / z) / ((double) (z + 1.0)))));
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.7 |
|---|---|
| Target | 4.0 |
| Herbie | 2.1 |
Initial program Error: 14.7 bits
SimplifiedError: 13.7 bits
rmApplied add-cube-cbrtError: 14.0 bits
Applied times-fracError: 8.8 bits
Applied associate-*r*Error: 3.2 bits
SimplifiedError: 3.2 bits
rmApplied associate-/r*Error: 2.1 bits
Taylor expanded around -inf Error: 34.1 bits
SimplifiedError: 2.1 bits
Final simplificationError: 2.1 bits
herbie shell --seed 2020203
(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))))