\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{x}{x + y} \cdot \frac{\frac{y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r377224 = x;
double r377225 = y;
double r377226 = r377224 * r377225;
double r377227 = r377224 + r377225;
double r377228 = r377227 * r377227;
double r377229 = 1.0;
double r377230 = r377227 + r377229;
double r377231 = r377228 * r377230;
double r377232 = r377226 / r377231;
return r377232;
}
double f(double x, double y) {
double r377233 = x;
double r377234 = y;
double r377235 = r377233 + r377234;
double r377236 = r377233 / r377235;
double r377237 = 1.0;
double r377238 = r377235 + r377237;
double r377239 = r377234 / r377238;
double r377240 = r377239 / r377235;
double r377241 = r377236 * r377240;
return r377241;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.2 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.2
rmApplied times-frac7.6
rmApplied associate-/r*0.2
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019208 +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))))