\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\frac{\frac{x}{x + y}}{\frac{x + y}{\frac{y}{x + \left(y + 1\right)}}}
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
(FPCore (x y) :precision binary64 (/ (/ x (+ x y)) (/ (+ x y) (/ y (+ x (+ y 1.0))))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
double code(double x, double y) {
return (x / (x + y)) / ((x + y) / (y / (x + (y + 1.0))));
}




Bits error versus x




Bits error versus y
Results
| Original | 19.9 |
|---|---|
| Target | 0.2 |
| Herbie | 0.4 |
Initial program 19.9
Applied associate-/l*_binary6411.8
Simplified9.7
Applied *-un-lft-identity_binary649.7
Applied *-un-lft-identity_binary649.7
Applied times-frac_binary649.7
Applied times-frac_binary646.0
Applied associate-/r*_binary640.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2021313
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))