\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}}{x + y}double f(double x, double y) {
double r402425 = x;
double r402426 = y;
double r402427 = r402425 * r402426;
double r402428 = r402425 + r402426;
double r402429 = r402428 * r402428;
double r402430 = 1.0;
double r402431 = r402428 + r402430;
double r402432 = r402429 * r402431;
double r402433 = r402427 / r402432;
return r402433;
}
double f(double x, double y) {
double r402434 = x;
double r402435 = y;
double r402436 = r402434 + r402435;
double r402437 = r402434 / r402436;
double r402438 = 1.0;
double r402439 = r402436 + r402438;
double r402440 = r402435 / r402439;
double r402441 = r402440 / r402436;
double r402442 = r402437 * r402441;
return r402442;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.7 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.7
rmApplied times-frac8.0
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
rmApplied *-un-lft-identity0.1
Applied times-frac0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020062 +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))))