\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{\sqrt[3]{x}}{\frac{x + y}{\sqrt[3]{x}}} \cdot \left(\frac{\sqrt[3]{x}}{x + y} \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) cbrt(x)) / ((double) (((double) (x + y)) / ((double) cbrt(x)))))) * ((double) (((double) (((double) cbrt(x)) / ((double) (x + y)))) * ((double) (y / ((double) (((double) (x + y)) + 1.0))))))));
}




Bits error versus x




Bits error versus y
Results
| Original | 19.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.7 |
Initial program 19.1
rmApplied associate-*l*19.1
Applied add-cube-cbrt19.4
Applied associate-*l*19.4
Applied times-frac8.4
Simplified8.4
Simplified0.7
Final simplification0.7
herbie shell --seed 2020114 +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))))