\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\left(\frac{\sqrt[3]{x}}{\sqrt[3]{\left|x + y\right|} \cdot \sqrt[3]{\left|x + y\right|}} \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{\left|x + y\right|}}\right) \cdot \left(\frac{\sqrt[3]{x}}{\left|x + y\right|} \cdot \frac{y}{\left(x + y\right) + 1}\right)double code(double x, double y) {
return ((double) (((double) (x * y)) / ((double) (((double) (((double) (x + y)) * ((double) (x + y)))) * ((double) (((double) (x + y)) + 1.0))))));
}
double code(double x, double y) {
return ((double) (((double) (((double) (((double) cbrt(x)) / ((double) (((double) cbrt(((double) fabs(((double) (x + y)))))) * ((double) cbrt(((double) fabs(((double) (x + y)))))))))) * ((double) (((double) cbrt(x)) / ((double) cbrt(((double) fabs(((double) (x + y)))))))))) * ((double) (((double) (((double) cbrt(x)) / ((double) fabs(((double) (x + y)))))) * ((double) (y / ((double) (((double) (x + y)) + 1.0))))))));
}




Bits error versus x




Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.2 |
| Herbie | 0.6 |
Initial program 20.0
rmApplied add-sqr-sqrt20.0
Applied associate-*l*20.0
Applied add-cube-cbrt20.3
Applied associate-*l*20.3
Applied times-frac10.7
Simplified10.7
Simplified0.7
rmApplied add-cube-cbrt0.6
Applied associate-/l*0.6
Applied associate-/r/0.6
Final simplification0.6
herbie shell --seed 2020113 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1))))