\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}}{y + x}double f(double x, double y) {
double r525124 = x;
double r525125 = y;
double r525126 = r525124 * r525125;
double r525127 = r525124 + r525125;
double r525128 = r525127 * r525127;
double r525129 = 1.0;
double r525130 = r525127 + r525129;
double r525131 = r525128 * r525130;
double r525132 = r525126 / r525131;
return r525132;
}
double f(double x, double y) {
double r525133 = x;
double r525134 = y;
double r525135 = r525133 + r525134;
double r525136 = r525133 / r525135;
double r525137 = 1.0;
double r525138 = r525135 + r525137;
double r525139 = r525134 / r525138;
double r525140 = r525134 + r525133;
double r525141 = r525139 / r525140;
double r525142 = r525136 * r525141;
return r525142;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.9 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.9
rmApplied times-frac7.9
rmApplied associate-/r*0.2
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2020042
(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))))