\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 r268332 = x;
double r268333 = y;
double r268334 = r268332 * r268333;
double r268335 = r268332 + r268333;
double r268336 = r268335 * r268335;
double r268337 = 1.0;
double r268338 = r268335 + r268337;
double r268339 = r268336 * r268338;
double r268340 = r268334 / r268339;
return r268340;
}
double f(double x, double y) {
double r268341 = x;
double r268342 = y;
double r268343 = r268341 + r268342;
double r268344 = r268341 / r268343;
double r268345 = r268344 * r268342;
double r268346 = 1.0;
double r268347 = r268343 + r268346;
double r268348 = r268345 / r268347;
double r268349 = r268348 / r268343;
return r268349;
}




Bits error versus x




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