\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{\frac{x}{x + y} \cdot y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r375316 = x;
double r375317 = y;
double r375318 = r375316 * r375317;
double r375319 = r375316 + r375317;
double r375320 = r375319 * r375319;
double r375321 = 1.0;
double r375322 = r375319 + r375321;
double r375323 = r375320 * r375322;
double r375324 = r375318 / r375323;
return r375324;
}
double f(double x, double y) {
double r375325 = x;
double r375326 = y;
double r375327 = r375325 + r375326;
double r375328 = r375325 / r375327;
double r375329 = r375328 * r375326;
double r375330 = 1.0;
double r375331 = r375327 + r375330;
double r375332 = r375329 / r375331;
double r375333 = r375332 / r375327;
return r375333;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 20.0
rmApplied times-frac8.3
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
rmApplied associate-*r/0.1
Final simplification0.1
herbie shell --seed 2020039 +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))))