\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} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r397624 = x;
double r397625 = y;
double r397626 = r397624 * r397625;
double r397627 = r397624 + r397625;
double r397628 = r397627 * r397627;
double r397629 = 1.0;
double r397630 = r397627 + r397629;
double r397631 = r397628 * r397630;
double r397632 = r397626 / r397631;
return r397632;
}
double f(double x, double y) {
double r397633 = x;
double r397634 = y;
double r397635 = r397633 + r397634;
double r397636 = r397633 / r397635;
double r397637 = 1.0;
double r397638 = r397635 + r397637;
double r397639 = r397634 / r397638;
double r397640 = r397636 * r397639;
double r397641 = r397640 / r397635;
return r397641;
}




Bits error versus x




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