\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}}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}double f(double x, double y) {
double r464395 = x;
double r464396 = y;
double r464397 = r464395 * r464396;
double r464398 = r464395 + r464396;
double r464399 = r464398 * r464398;
double r464400 = 1.0;
double r464401 = r464398 + r464400;
double r464402 = r464399 * r464401;
double r464403 = r464397 / r464402;
return r464403;
}
double f(double x, double y) {
double r464404 = x;
double r464405 = y;
double r464406 = r464404 + r464405;
double r464407 = r464404 / r464406;
double r464408 = r464407 / r464406;
double r464409 = 1.0;
double r464410 = r464406 + r464409;
double r464411 = r464405 / r464410;
double r464412 = r464408 * r464411;
return r464412;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 20.0
rmApplied times-frac7.8
rmApplied associate-/r*0.2
Final simplification0.2
herbie shell --seed 2020064
(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))))