\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}}{x + y} \cdot \frac{1}{\frac{\left(x + y\right) + 1}{y}}double f(double x, double y) {
double r451074 = x;
double r451075 = y;
double r451076 = r451074 * r451075;
double r451077 = r451074 + r451075;
double r451078 = r451077 * r451077;
double r451079 = 1.0;
double r451080 = r451077 + r451079;
double r451081 = r451078 * r451080;
double r451082 = r451076 / r451081;
return r451082;
}
double f(double x, double y) {
double r451083 = x;
double r451084 = y;
double r451085 = r451083 + r451084;
double r451086 = r451083 / r451085;
double r451087 = r451086 / r451085;
double r451088 = 1.0;
double r451089 = 1.0;
double r451090 = r451085 + r451089;
double r451091 = r451090 / r451084;
double r451092 = r451088 / r451091;
double r451093 = r451087 * r451092;
return r451093;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 20.0
rmApplied times-frac8.1
rmApplied associate-/r*0.2
rmApplied clear-num0.2
Final simplification0.2
herbie shell --seed 2020060
(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))))