\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{x}{x + y} \cdot \frac{\frac{y}{\left(x + y\right) + 1}}{x + y}(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
(FPCore (x y) :precision binary64 (* (/ x (+ x y)) (/ (/ y (+ (+ x y) 1.0)) (+ x y))))
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)) * ((y / ((x + y) + 1.0)) / (x + y));
}













Bits error versus x













Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
| Alternative 1 | |
|---|---|
| Error | 8.7 |
| Cost | 1288 |
| Alternative 2 | |
|---|---|
| Error | 16.8 |
| Cost | 1169 |
| Alternative 3 | |
|---|---|
| Error | 17.0 |
| Cost | 1169 |
| Alternative 4 | |
|---|---|
| Error | 17.6 |
| Cost | 1732 |
| Alternative 5 | |
|---|---|
| Error | 17.5 |
| Cost | 776 |
| Alternative 6 | |
|---|---|
| Error | 25.6 |
| Cost | 648 |
| Alternative 7 | |
|---|---|
| Error | 27.8 |
| Cost | 962 |
| Alternative 8 | |
|---|---|
| Error | 30.6 |
| Cost | 64 |
| Alternative 9 | |
|---|---|
| Error | 61.8 |
| Cost | 64 |

Initial program 20.0
rmApplied associate-/r*_binary64_1263917.1
Simplified7.8
rmApplied *-un-lft-identity_binary64_126957.8
Applied times-frac_binary64_127010.2
rmApplied *-un-lft-identity_binary64_126950.2
Applied times-frac_binary64_127010.2
Simplified0.2
Simplified0.2
rmApplied div-inv_binary64_126920.2
Applied associate-*l*_binary64_126360.2
Simplified0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2021044
(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))))