\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{x}{x + y} \cdot y}{x + y}}{\left(x + y\right) + 1}double f(double x, double y) {
double r268173 = x;
double r268174 = y;
double r268175 = r268173 * r268174;
double r268176 = r268173 + r268174;
double r268177 = r268176 * r268176;
double r268178 = 1.0;
double r268179 = r268176 + r268178;
double r268180 = r268177 * r268179;
double r268181 = r268175 / r268180;
return r268181;
}
double f(double x, double y) {
double r268182 = x;
double r268183 = y;
double r268184 = r268182 + r268183;
double r268185 = r268182 / r268184;
double r268186 = r268185 * r268183;
double r268187 = r268186 / r268184;
double r268188 = 1.0;
double r268189 = r268184 + r268188;
double r268190 = r268187 / r268189;
return r268190;
}




Bits error versus x




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