\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}{y + x} \cdot \frac{y}{\left(y + x\right) + 1}}{y + x}double f(double x, double y) {
double r17548593 = x;
double r17548594 = y;
double r17548595 = r17548593 * r17548594;
double r17548596 = r17548593 + r17548594;
double r17548597 = r17548596 * r17548596;
double r17548598 = 1.0;
double r17548599 = r17548596 + r17548598;
double r17548600 = r17548597 * r17548599;
double r17548601 = r17548595 / r17548600;
return r17548601;
}
double f(double x, double y) {
double r17548602 = x;
double r17548603 = y;
double r17548604 = r17548603 + r17548602;
double r17548605 = r17548602 / r17548604;
double r17548606 = 1.0;
double r17548607 = r17548604 + r17548606;
double r17548608 = r17548603 / r17548607;
double r17548609 = r17548605 * r17548608;
double r17548610 = r17548609 / r17548604;
return r17548610;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.6 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.6
rmApplied times-frac7.8
rmApplied *-un-lft-identity7.8
Applied times-frac0.2
rmApplied associate-*r/0.2
Applied associate-*l/0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019174 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))