\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{1}{\frac{x + y}{\frac{x}{x + y}}} \cdot \frac{y}{\left(x + y\right) + 1}double f(double x, double y) {
double r498710 = x;
double r498711 = y;
double r498712 = r498710 * r498711;
double r498713 = r498710 + r498711;
double r498714 = r498713 * r498713;
double r498715 = 1.0;
double r498716 = r498713 + r498715;
double r498717 = r498714 * r498716;
double r498718 = r498712 / r498717;
return r498718;
}
double f(double x, double y) {
double r498719 = 1.0;
double r498720 = x;
double r498721 = y;
double r498722 = r498720 + r498721;
double r498723 = r498720 / r498722;
double r498724 = r498722 / r498723;
double r498725 = r498719 / r498724;
double r498726 = 1.0;
double r498727 = r498722 + r498726;
double r498728 = r498721 / r498727;
double r498729 = r498725 * r498728;
return r498729;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.7 |
|---|---|
| Target | 0.1 |
| Herbie | 0.5 |
Initial program 19.7
rmApplied times-frac7.5
rmApplied associate-/r*0.2
rmApplied *-un-lft-identity0.2
Applied *-un-lft-identity0.2
Applied times-frac0.2
Applied associate-/l*0.5
Final simplification0.5
herbie shell --seed 2020001
(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))))