\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{y}{x + y}}{\frac{x + y}{x}}}{1 + \left(x + y\right)}double f(double x, double y) {
double r370765 = x;
double r370766 = y;
double r370767 = r370765 * r370766;
double r370768 = r370765 + r370766;
double r370769 = r370768 * r370768;
double r370770 = 1.0;
double r370771 = r370768 + r370770;
double r370772 = r370769 * r370771;
double r370773 = r370767 / r370772;
return r370773;
}
double f(double x, double y) {
double r370774 = y;
double r370775 = x;
double r370776 = r370775 + r370774;
double r370777 = r370774 / r370776;
double r370778 = r370776 / r370775;
double r370779 = r370777 / r370778;
double r370780 = 1.0;
double r370781 = r370780 + r370776;
double r370782 = r370779 / r370781;
return r370782;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 20.0
Simplified20.0
rmApplied times-frac8.0
Simplified8.0
Simplified0.2
rmApplied associate-*l/0.2
Simplified0.1
rmApplied div-inv0.2
Simplified0.2
rmApplied *-un-lft-identity0.2
Applied associate-/r*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019179
(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))))